matlab - Find rows in matrix where entries match certain constraints? -


i have matrix in matlab , want find indeces of rows, some of columns meet specific criteria.

example

m =   1     5     9    13  2     6    10    14 10    14    11    15  4     8    10    14 

now want find incedeces of rows, m(:,3) == 10 , m(:,4) == 14.

the result should be:

r =   0  1  0  1 

i though like

find(ismember(m,[* * 10 14]),1) 

but ismember() won't work wildcars.

r = (m(:,3) == 10 & m(:,4) == 14); 

should sufficient.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -