help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find


From: Carlo Rossi
Subject: Re: find
Date: Thu, 4 Jun 2009 15:26:25 +0000 (GMT)

Hello,


class = [1  1 1 -1 -1 1];

This is is what I need:

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,




      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]