[scilab-Users] Polynomial roots
Inderpreet Arora
inderpreet.arora at yahoo.com
Sat Jan 10 19:56:04 CET 2009
Thanks. Now, I could figure out that it is stored with an (eventually zero) imaginary part (Help: Description of isreal function).
-->isreal(r)
ans =
F
-->isreal(a)
ans =
T
Sincerely,
Inderpreet
--- On Sat, 1/10/09, François Vogel <fvogelnew1 at free.fr> wrote:
From: François Vogel <fvogelnew1 at free.fr>
Subject: Re: [scilab-Users] Polynomial roots
To: users at lists.scilab.org
Date: Saturday, January 10, 2009, 6:05 PM
-->real(r) > 2
ans =
F
T
Francois
Inderpreet Arora said on 10/01/2009 18:33:
> Hello,
> I want to compare roots of a polynomial with a number. But it gives error..
Consider a simple e.g.,
>
> a = [2 3];
> s = %s;
> x = s^2 - 5*s + 6;
> r = roots(x); r1 = [roots(x)]';
> t1 = type(a);
> t2 = type(r);
> a > 2
> r > 2
>
> It does the comparison for a (done for verification) but gives the
following error for r and r1, though their types are same,
>
> Undefined operation for the given operands
> check or define function %s_2_s for overloading
>
> I tried in versions 4.1 and 4.1.2. Please guide. Thanks.
>
> Sincerely,
> Inderpreet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20090110/468ccc2a/attachment.htm>
More information about the users
mailing list