FYI, Scilab 5.4.1 will show:
-->1./[2 3 4]
Warning: "1./ ..." is interpreted as "1.0/ ...". Use "1 ./ ..." for
element wise operation
ans =
0.0689655
0.1034483
0.1379310
Sylvestre
On 19/10/2012 16:56, Adrien Vogt-Schilb wrote:
> hI
>
> This is interpreted as 1.0/[2 3 4] (yes it
hI
This is interpreted as 1.0/[2 3 4] (yes it is combersome)
you want to use:
1.0./[2 3 4]
or
1 ./[2 3 4] //mind the space before the dot
you can also use [2 3 4].^-1
note that
[2 3 4]*[0.0689;0.1034;0.1379] = 1
also note the orientation of each matrix (row or column)
On 19/10/2012
In one of the exercises that came with the scilab documentation there is a
question that says:
Why does:
1./[2 3 4]
give the strange result
0.0689
0.1034
0.1379
Instead of
0.5
0.333
0.25
I can't seem to come up with an answer.
Thanks for the help!
Mel__