[scilab-Users] Strange behaviour (in matrix visualization?)

duboism at limsi.fr duboism at limsi.fr
Tue Aug 26 11:04:40 CEST 2008


Hello Donatello,

I don't know if that helps but I tried to play a bit with your example
script (see attached file - there is a minor error in the definition of
P). I run the same version of scilab on Fedora 9 32-bits.

On my computer, the matrix Q (result of Psqroot' * Psqroot) is correctly
computed and printed.

If you set the number of digits to be printed with 'format()' to 20 you
can see that there are little difference between P and Q (I assume this is
rounding errors). That's why 'Q == P' does not return [T, T; T, T]. If you
compare with %eps it works.

Kind regards,
Mathieu

> Hello,
>
> I report this strange behaviour.
>
> Scilab version 4.1.2 for linux debian (official package).
>
> try this commands
>
>> P=[1,0.3;0,3,2]  //fine
>
>> Psqroot=sqroot(P)'   //fine
>
>> Q=Psqroot' * Psqroot  // it displays a matrix different from P in the
> entry (1,1), indeed Q is [2, 0.3; 0.3, 2]
>
>> Q-P  // it is about 0 ????
>
> It seems that the visualization in incorrect, but scilab
> manages the computation in the proper way.
>
> Thanks
> Donatello Materassi
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_sqroot.sce
Type: application/octet-stream
Size: 159 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20080826/0e7bd01c/attachment.obj>


More information about the users mailing list