Thread Subject: how to plot functions of this type?

Subject: how to plot functions of this type?

From: Mohammad Monfared

Date: 10 Mar, 2008 12:41:13

Message: 1 of 3

How to plot the functions of the type f(x,y,z)=c , in
matlab? which functions should be used?

thanks!
Reza M.

Subject: how to plot functions of this type?

From: Adam Chapman

Date: 10 Mar, 2008 15:26:30

Message: 2 of 3

On Mar 10, 12:41=A0pm, "Mohammad Monfared" <gohardo...@gmail.com> wrote:
> How to plot the functions of the type f(x,y,z)=3Dc , in
> matlab? which functions should be used?
>
> thanks!
> Reza M.

meshc os surf will work x,y and z will be 3d coordibates in your
figure and colour will depict c.

try mesh(x,y,z,c)
or surf(x,y,z,c)

Subject: how to plot functions of this type?

From: Michael Garrity

Date: 10 Mar, 2008 19:05:21

Message: 3 of 3


"Mohammad Monfared" <gohardoust@gmail.com> wrote in message news:fr3a99$kue$1@fred.mathworks.com...
> How to plot the functions of the type f(x,y,z)=c , in
> matlab? which functions should be used?
>
> thanks!
> Reza M.
>

One easy way is isosurface. Consider this example:

nx=12
ny=12
nz=12
[x y z]=meshgrid(linspace(-1,1,nx),linspace(-1,1,ny),linspace(-1,1,nz))
v=2*x.^2 - 3*y.^3 + 4*z.^4
c=1
isosurface(v,c)

Reformulating as an implicit equation can save a
lot of memory at high resolution though.

    -MPG-

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com