[scilab-Users] Polynomial roots

François Vogel fvogelnew1 at free.fr
Sat Jan 10 19:05:11 CET 2009


-->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



More information about the users mailing list