[Top][All Lists]

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

Re: Easy about Matrices

From: Quentin Spencer
Subject: Re: Easy about Matrices
Date: Mon, 18 Apr 2005 12:43:05 -0500
User-agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324)

Alvaro Aguilera wrote:


I want to plot the data inside a matrix, but with different colors for the negative and positve terms. I do this now by spliting the matrix into two (negative, positive) using a "for" loop, and I wonder if there is another better approach to do this.

Any hint welcome :)


I'm not completely sure if this is what you're looking for, but maybe this example helps:

x = randn(1,1000);
x_positive = x(find(x>=0));
x_negative = x(find(x<0));


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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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