Difference in calculations between Matlab and Scilab

Sébastien Bihorel pomchip at free.fr
Wed Nov 11 14:32:23 CET 2009


Hi

I would be interested knowing why Scilab (version beta 5.2) and Matlab
(7.6.0) do not provide the same results for a '1/x' calculation (with x
being a matrix of real numbers), and how to reproduce the results of Matlab
in Scilab for this particular case.

Thank you

Sebastien

%%%%%%Matlab

>> X=1:5

X =

     1     2     3     4     5

>> 1./X

ans =

    1.0000    0.5000    0.3333    0.2500    0.2000


/////////////// Scilab

-->X=1:5
 X  =

    1.    2.    3.    4.    5.

-->1./X
 ans  =

    0.0181818
    0.0363636
    0.0545455
    0.0727273
    0.0909091
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20091111/17e1b27a/attachment.htm>


More information about the users mailing list