[Scilab-users] [EXTERNAL] Re: {EXT} unexpected result

Carrico, Paul paul.carrico at auxitrolweston.com
Thu May 23 09:20:55 CEST 2019


Hi all for the feedback

Indeed it's logical afterward, and it has been made to be fast and efficient ... but I spent a lot of time in finding my mistake that it uses a "local/temporary" index than a "global" one.

I share your suggestion in adding an example in the doc to prevent Scilab users, but the question is "where" ?

Paul



-----Message d'origine-----
De : users [mailto:users-bounces at lists.scilab.org] De la part de Dang Ngoc Chan, Christophe
Envoyé : jeudi 23 mai 2019 09:14
À : Users mailing list for Scilab
Objet : [EXTERNAL] Re: [Scilab-users] {EXT} unexpected result

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://urldefense.proofpoint.com/v2/url?u=https-3A__help.scilab.org_docs_6.0.2_en-5FUS_extraction.html&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w&s=zrjH9zC_wmeR2sNsnm6LqAH5OhklVr2sn_50F2Z1Fjo&e=
we read "r=x(i,j) builds the matrix r such as […]"

and
https://urldefense.proofpoint.com/v2/url?u=https-3A__help.scilab.org_docs_6.0.2_en-5FUS_find.html&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w&s=OYg1le1-U4zV-uuw5ELo1kH_6ne9heq4jXFovUh3B0o&e=
"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.
_______________________________________________
users mailing list
users at lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=h_9KPbMv5WwpOSsz29HjgLF8hOXdEKk2R2dkyVy334w&s=X2P0bkSUBEv9LsNxFZbxr_BvXqso_YMPWQxb7TWdNgw&e=


More information about the users mailing list