Finding the other elements in array or matrices

pauljoseph oka.kurniawan at gmail.com
Wed Jan 16 01:38:27 CST 2008



Marc Normandin wrote:
> 
> There's likely to be a more efficient way to handle this problem, but
> here's one possible solution.
> 
> mask2=1:length(a);
> mask2(mask)=0;
> idx=find(mask2);
> a(idx)
> 

Thanks, it works. Soren also suggested using setdiff, I found out also that
we can use setxor. The results look the same.


-- 
View this message in context: http://www.nabble.com/Finding-the-other-elements-in-array-or-matrices-tp14859516p14872032.html
Sent from the Octave - General mailing list archive at Nabble.com.



More information about the Help-octave mailing list