[Scilab-users] {EXT} unexpected result

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Thu May 23 09:14:10 CEST 2019


Hello Paul,

> De : Carrico, Paul
> Envoyé : mercredi 22 mai 2019 09:51
>
> In the following code,
> I was thinking that the provided index was the one on the “global”
> matrix, but I was wrong ☺ […]
> a2 = find(B(i-1:$,1) < 1); disp(a2);

I would have made the same mistake (-:

Now if we look at the documentation
https://help.scilab.org/docs/6.0.2/en_US/extraction.html
we read "r=x(i,j) builds the matrix r such as […]"

and
https://help.scilab.org/docs/6.0.2/en_US/find.html
"If x is a boolean matrix, ii=find(x) returns […]"

so the behaviour seems quite logical.

But it might be a good idea to provide an example such as yours in the documentation, at least to preserve our injured self-esteem (we are not the only two who have been fooled).

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


More information about the users mailing list