Réf: Question about Scilab-poly
michel.marzin at ext.mpsa.com
michel.marzin at ext.mpsa.com
Wed Dec 17 15:22:24 CET 2008
Sylvestre,
his matrix was :
A=
1 1 3
1 2 4
0 1 1
in short term,
the poly of this matrix is : det( I*x - A) = x^2*(x-4)
solution by hand of course, and i don't see myself do it on a 1000*1000
matrix.
under my Scilab 4.12 : 5.121D-16 + 2.902D-16x -4 x^2 + x^3
under my Scilab 5.0.3 : - 7.019D-17 + 1.792D-15x - 4x^2 + x^3
Regarding A, i assume that all value almost at zero are zeros.
i mean, det(A)=0 so at least zero is a root of my "poly" and i assume at
least that 5.121D-16 is "zero" or - 7.019D-17.
A famous Scilab alternative do that also but you have to take care of the
truncation of the values in this case.
>> poly(a)
ans =
1.0000 -4.0000 0.0000 0.0000
"good" result in this case, but if i assume that in my matrix, the zero is
now 0.000001, it's now a wrong result.
regards
----------------------------------------------------------------------
Michel
Sylvestre Ledru
<sylvestre.ledru
@scilab.org> Pour
users at lists.scilab.org
17/12/2008 14:06 cc
Objet
Veuillez Re: [scilab-Users] Question about
répondre à Scilab-poly
users at lists.scil
ab.org
Le mardi 16 décembre 2008 à 12:46 +0200, Sotos a écrit :
> Hallo,
>
> I have been using Scilab for about 3 months,as a new student.
> My question...
> What kind of number is that at the bottom...(4.406D-16).
Note that Scilab 5 is results closer that what you expect:
-->a=[1 1 3
-->1 2 3
-->0 1 1 ]
a =
1. 1. 3.
1. 2. 3.
0. 1. 1.
-->p= poly(a,"z")
p =
2 3
- 1 + z - 4z + z
Sylvestre
More information about the users
mailing list