help-octave
[Top][All Lists]
Advanced

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

Re: howto plot data in 3D


From: Ben Abbott
Subject: Re: howto plot data in 3D
Date: Fri, 08 Oct 2010 07:27:35 -0400

On Oct 8, 2010, at 6:16 AM, Martijn wrote:

> Thanks,
> The documentation is too modest. Another question: is there a way to
> plot a subs of the data using conditional indexing. E.g:
> 
> cond = sqrt(x.^2 + y.^2) < R;
> mesh(x(cond), y(cond), z(cond), c(cond))
> 
> Martijn

An easy way to do that is to imply which points you don't want.

[x, y, z] = peaks;
n = (x.^2 + y.^2).^0.5 > 3;
x(n) = NaN;
y(n) = NaN;
z(n) = NaN;
mesh (x, y, z)

Ben



reply via email to

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