Thread Subject: Mesh or Surface plot

Subject: Mesh or Surface plot

From: King

Date: 24 May, 2009 12:02:01

Message: 1 of 4

I am new to mesh and/or surface plot in MATLAB. I have generated data in the format
[ x y z] where z=z(x,y). For example the data file looks like

0 1 0.2
0 2 0.25
1 1 0.21
1 2 0.31
2 1 0.3
2 2 0.41
etc.....

How do I plot this data? If I use plot3 it is connecting all the points. How can I do a mesh or surface plot? I tried doing the following: Result=[x y z] where Result is a matrix and then used mesh(Result). It plotted something but I don't see the actual values of x,y,z points on the axes. I want to see the range of x,y, and z on the axes. What is the best way to do that?
Any help will be greatly appreciated.

Subject: Mesh or Surface plot

From: Bruno Luong

Date: 24 May, 2009 12:21:01

Message: 2 of 4

"King" <majumdak@gvsu.edu> wrote in message <gvbcvp$24$1@fred.mathworks.com>...
> I am new to mesh and/or surface plot in MATLAB. I have generated data in the format
> [ x y z] where z=z(x,y). For example the data file looks like
>
> 0 1 0.2
> 0 2 0.25
> 1 1 0.21
> 1 2 0.31
> 2 1 0.3
> 2 2 0.41
> etc.....
>
> How do I plot this data? If I use plot3 it is connecting all the points. How can I do a mesh or surface plot? I tried doing the following: Result=[x y z] where Result is a matrix and then used mesh(Result). It plotted something but I don't see the actual values of x,y,z points on the axes. I want to see the range of x,y, and z on the axes. What is the best way to do that?
> Any help will be greatly appreciated.

Take a look at TRIMESH, TRISURF, DELAUNAY

Bruno

Subject: Mesh or Surface plot

From: John D'Errico

Date: 24 May, 2009 12:34:02

Message: 3 of 4

"King" <majumdak@gvsu.edu> wrote in message <gvbcvp$24$1@fred.mathworks.com>...
> I am new to mesh and/or surface plot in MATLAB. I have generated data in the format
> [ x y z] where z=z(x,y). For example the data file looks like
>
> 0 1 0.2
> 0 2 0.25
> 1 1 0.21
> 1 2 0.31
> 2 1 0.3
> 2 2 0.41
> etc.....
>
> How do I plot this data? If I use plot3 it is connecting all the points. How can I do a mesh or surface plot? I tried doing the following: Result=[x y z] where Result is a matrix and then used mesh(Result). It plotted something but I don't see the actual values of x,y,z points on the axes. I want to see the range of x,y, and z on the axes. What is the best way to do that?
> Any help will be greatly appreciated.

gridfit, from the FEX will help here.

http://www.mathworks.com/matlabcentral/fileexchange/8998

John

Subject: Mesh or Surface plot

From: Luigi Giaccari

Date: 25 May, 2009 09:36:01

Message: 4 of 4

"King" <majumdak@gvsu.edu> wrote in message <gvbcvp$24$1@fred.mathworks.com>...
> I am new to mesh and/or surface plot in MATLAB. I have generated data in the format
> [ x y z] where z=z(x,y). For example the data file looks like
>
> 0 1 0.2
> 0 2 0.25
> 1 1 0.21
> 1 2 0.31
> 2 1 0.3
> 2 2 0.41
> etc.....
>
> How do I plot this data? If I use plot3 it is connecting all the points. How can I do a mesh or surface plot? I tried doing the following: Result=[x y z] where Result is a matrix and then used mesh(Result). It plotted something but I don't see the actual values of x,y,z points on the axes. I want to see the range of x,y, and z on the axes. What is the best way to do that?
> Any help will be greatly appreciated.


http://www.mathworks.com/matlabcentral/fileexchange/23447

http://giaccariluigi.altervista.org/blog/

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
3d plot King 24 May, 2009 08:04:02
mesh King 24 May, 2009 08:04:02
surf King 24 May, 2009 08:04:02
plot King 24 May, 2009 08:04:02
rssFeed for this Thread

Contact us at files@mathworks.com