[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extract rows of a matrix based on value of column
From: |
Michael Grossbach |
Subject: |
Re: Extract rows of a matrix based on value of column |
Date: |
Wed, 29 Nov 2006 21:09:26 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (Windows/20061025) |
Masatran, R. Deepak wrote:
Octave list,
How can I extract the rows of a matrix which have a particular value in a
particular column?
A = round(rand(10)*10); # generate random integers.
rows = find(A(:,6) == 5); # extract row indices to 5's in col 6
Returns the empty matrix if no 5 is in column 6.
HTH, Michael