From: M Paheerathan on
a = solve('-4.4159e-005*x^2+-0.00065039*x+0.0008699=0')
Output is passed to the following function
min=-10
max=10
values = a

function inrangeValue = checkRange(min, max,values)
for i=1:length(values)
if (values(i)>min) && (values(i)<max)
inrangeValue=values(i);
end
end


I'm getting a error: ??? Undefined function or method 'gt' for input arguments of type 'sym'.

What is the reason for this?
From: Steven Lord on

"M Paheerathan" <mp.mscproject(a)yahoo.com> wrote in message
news:i1jhel$gso$1(a)fred.mathworks.com...
>a = solve('-4.4159e-005*x^2+-0.00065039*x+0.0008699=0')
> Output is passed to the following function
> min=-10
> max=10
> values = a
>
> function inrangeValue = checkRange(min, max,values)
> for i=1:length(values)
> if (values(i)>min) && (values(i)<max)
> inrangeValue=values(i); end
> end
>
>
> I'm getting a error: ??? Undefined function or method 'gt' for input
> arguments of type 'sym'.
>
> What is the reason for this?

Because the greater-than operator (>) is not defined for sym objects and GT
is the name of the function form of that operator. [If x and y were
arbitrary symbolic variables, what should x > y return if > were defined for
sym objects?]

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com