help-octave
[Top][All Lists]
Advanced

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

Re: help


From: Mike Miller
Subject: Re: help
Date: Wed, 21 Sep 2005 10:48:00 -0500 (CDT)

On Wed, 21 Sep 2005, David Bateman wrote:

shashi kumar wrote:

I w'd like to delete some selected rows of a 3 column matrix, say, 10000*3, and i have tried as given below command and got like this message. so kindly tell me how to make empty to particular rows with all column.

octave:1> load File1
octave:2> [x y]=find(File1(:,3)>-3000)
octave:3> []=File1(x,:);


Shouldn't that read "File1(x,:)=[];" ?


Interesting. This must be a fairly new Octave feature. So if I understand the method, setting elements of a matrix to '[]' deletes those elements and changes the original matrix to a row vector.

In this example, wouldn't this do the same thing (if all elements were real, complex or integer)?:

File1 = File1(find(File1(:,3)<=-3000));

When there might be NaNs, the result could be different.

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]