help-octave
[Top][All Lists]
Advanced

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

RE: indices of zeros in matrix


From: Mike Miller
Subject: RE: indices of zeros in matrix
Date: Thu, 10 Jul 2003 12:13:38 -0500 (CDT)

On Thu, 10 Jul 2003, Julian DeMarchi wrote:

> I believe it's
>
> % assuming X is your matrix
> find(X==0)

If you do it this way...

[i, j] = find(X==0)

...instead of fortran indexing, you'll get the row indices in 'i' and the
column indices in 'j'.

Mike



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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