COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

Problems evaluating Q-function in Matlab7

• Email
• Follow

```Hi all,

I am currently in the midst of simulating a paper by the author Ning
Zhang and Jack Holtzman. The paper is called Analysis of handoff
Algorithms Using Both absolute and Relative measurements.

cutting straight to the point, i have a problem when i evaluate the
results of qfunc(x). The reason behind this is that my input x to the
qfunc, is actually a string, that contains a t variable. so it does
not evaluate it. anyone can give an idea on how i can make this
happen? thanks a bunch. heres my code below.

h = 2;
syms t0 ;
sigma_a = 1;
sigma_b = 1;
sigma_x = 1;

mew_a = -99;
mew_b = -40;
mew_x = 59;
mew_x_1 = -59;
y = 0.99;
syms y1 ;

beta_t = (-h-mew_x_1 - y*(t0-mew_x))/(sigma_x*sqrt(1-y^2));
Q_t = qfunc(beta_t)

output is given by as below (when i run this code)

??? Error using ==> qfunc
The argument of the Q function must be a real array.

Error in ==> testingthis at 44
Q_t = qfunc(beta_t)
```
 0
Reply ehlaw1 (2) 8/5/2005 2:01:28 PM

See related articles to this posting

```anyone??
```
 0
Reply ehlaw1 (2) 8/7/2005 2:53:35 PM

```GLEN wrote:
>
do you know how to simulate a handover model using matlab?
can i know on which part are u simulating?
can i have your m-file for this to check? cause am currently doing
the m-file for the q function to.
```
 0
Reply gh42 (6) 9/16/2005 7:19:36 AM

```The numerator of beta_t does not evaluate to a number because t0 is not assigned a numerical value.

I do not know if the statement `syms t0;' is meant to assign a value to t0. If so then it doesn't for some reason.
```
 0
Reply eakofor (1) 7/11/2012 5:01:54 AM

```
"eakofor" <eakofor@gmail.com> wrote in message
news:IImdne-DYYdYlWDSnZ2dnUVZ_hmdnZ2d@giganews.com...
> The numerator of beta_t does not evaluate to a number because t0 is not
> assigned a numerical value.
>
> I do not know if the statement `syms t0;' is meant to assign a value to
> t0. If so then it doesn't for some reason.

No, that statement is not intended to assign a numeric value to t0. Quite
the contrar,; it's intended to indicate that you want t0 to be treated as a
symbolic variable.

Use DOUBLE or SUBS to convert your numerator into a double precision value
by substituting in a value for t0 if necessary.

--
Steve Lord
slord@mathworks.com
http://www.mathworks.com

```
 0
Reply slord (13686) 7/11/2012 1:48:44 PM

5 Replies
45 Views

Similar Articles

12/9/2013 6:35:04 AM
[PageSpeed]