help-octave
[Top][All Lists]
Advanced

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

Re: Octave doubt - Problem to Solve


From: Søren Hauberg
Subject: Re: Octave doubt - Problem to Solve
Date: Thu, 07 May 2009 19:56:46 +0200

tor, 07 05 2009 kl. 10:11 -0400, skrev
address@hidden:
> I  Have a vector of 3 components and I need a function that extract
> just the Positive elements an put them in other vector/matrix. The
> same way I need to extract just the negative elements and put them in
> other vector/matrix.

You should be able to do something like

  positive = vector (vector > 0);
  negative = vector (vector < 0);

where 'vector' is the name of your data vector.

Søren



reply via email to

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