|
From: | James Sherman Jr. |
Subject: | Re: find |
Date: | Thu, 4 Jun 2009 12:15:01 -0400 |
Hello,
This is is what I need:
class = [1 1 1 -1 -1 1];
idx1 = find(class == 1); %retrieve the indexes of '1': 1,2,3,6
idx2 = find(class == -1); % retrieve 4,5
But I'd like to know if it's possible write it in a hit (and I need 2 different variables, id2, idx2)
[idx1, idx2] = find(class == 1; class == -1) %this dosn't work.
thanks,
[Prev in Thread] | Current Thread | [Next in Thread] |