Hello Paul,
B(i-1:$,1) in a rhs is evaluated as a temporary 6x1 vector when passed
as an argument to find() and any reference w.r.t. B is of course disgarded.
The obtained result is the expected result.
S.
Le 22/05/2019 à 09:51, Carrico, Paul a écrit :
Hi All,
In the following code, I was thinking that the provided index was the
one on the “global” matrix, but I was wrong J
(I guess a copy is performed first in order to be more efficient and
to speed-up the calculation)
Paul
n= 10;
B= ones(n,1);
i= 6;
B(i,1)=0.55;
a1= find(B(:,1) < 1); disp(a1);
a2= find(B(i-1:$,1) < 1); disp(a2);
_______________________________________________
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users