[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding the other elements in array or matrices
From: |
pauljoseph |
Subject: |
Re: Finding the other elements in array or matrices |
Date: |
Tue, 15 Jan 2008 23:38:27 -0800 (PST) |
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.