help-octave
[Top][All Lists]
Advanced

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

Re: How can I plot a matrix in a figure with different colors


From: c.
Subject: Re: How can I plot a matrix in a figure with different colors
Date: Fri, 12 Jul 2013 15:05:18 +0200

On 12 Jul 2013, at 13:41, pro_octave <address@hidden> wrote:

> Y is a N by 3 matrix, and the 3th col's values are 1 OR 2, how can I plot Y
> on a figure with two colors, which will be RED when Y[:,:,3]=1, and BLUE
> when Y[:,:,3]=2... pls help me, I will great appreciate

plot (Y(Y(:, 3) == 1,1), Y(Y(:, 3) == 1,2), 'ro', Y(Y(:, 3) == 2,1), Y(Y(:, 3) 
== 2,2), 'bx')

HTH,
c.

reply via email to

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