Thread Subject: How to make a 3D surface when z is not a explicit function of x and y

Subject: How to make a 3D surface when z is not a explicit function of x and y

From: Alexm Smith

Date: 11 Mar, 2010 00:15:06

Message: 1 of 4

I have x,y,z data, each in a column, but I've tried different ways to get the 3D plot, z vs. x and y plane, of coz.
Since I don't know the explicit function form of z concerning x and y.
How can I do this?
I want the 3D surface, not scattered points or curve.
Thank you so much!

Subject: How to make a 3D surface when z is not a explicit function of x and y

From: Jonas Lundgren

Date: 11 Mar, 2010 06:36:04

Message: 2 of 4

"Alexm Smith" <aleisia@hotmail.com> wrote in message <hn9cma$coa$1@fred.mathworks.com>...
> I have x,y,z data, each in a column, but I've tried different ways to get the 3D plot, z vs. x and y plane, of coz.
> Since I don't know the explicit function form of z concerning x and y.
> How can I do this?
> I want the 3D surface, not scattered points or curve.
> Thank you so much!

help griddata
/Jonas

Subject: How to make a 3D surface when z is not a explicit function of x

From: Ashish Uthama

Date: 11 Mar, 2010 18:04:06

Message: 3 of 4

On Wed, 10 Mar 2010 19:15:06 -0500, Alexm Smith <aleisia@hotmail.com>
wrote:

> I have x,y,z data, each in a column, but I've tried different ways to
> get the 3D plot, z vs. x and y plane, of coz. Since I don't know the
> explicit function form of z concerning x and y.
> How can I do this?
> I want the 3D surface, not scattered points or curve.
> Thank you so much!

hint(s):


N=50;
x=rand(1,N);
y=rand(1,N);
z=x.*x+y.*y; %A irregular circular disc in 3D space

%% Simple, in raw data form
figure;plot3(x,y,z,'*');

%% As a 3D surface

%Create a regular grid to view on
step=0.05;
[xi yi]=meshgrid(min(x):step:max(x),...
     min(y):step:max(y));

%Iterpolate the data on to the regular grid (griddata if you are on an
older release)
f=TriScatteredInterp(x',y',z');
zi=f(xi,yi);

%display surface
surf(xi,yi,zi)

Subject: How to make a 3D surface when z is not a explicit function of x and y

From: Luigi Giaccari

Date: 16 Mar, 2010 16:37:23

Message: 4 of 4

"Alexm Smith" <aleisia@hotmail.com> wrote in message <hn9cma$coa$1@fred.mathworks.com>...
> I have x,y,z data, each in a column, but I've tried different ways to get the 3D plot, z vs. x and y plane, of coz.
> Since I don't know the explicit function form of z concerning x and y.
> How can I do this?
> I want the 3D surface, not scattered points or curve.
> Thank you so much!


I hope one of these works

http://www.mathworks.com/matlabcentral/newsreader/create_message?reply_id=711429

http://www.advancedmcode.org/how-to-plot-a-coloured-surface-from-3d-scatter.html

http://www.advancedmcode.org/surface-recostruction-from-scattered-points-cloud-mycrustopen.html

http://www.advancedmcode.org/surface-recostruction-from-scattered-points-cloud-mycrust-robust.html



http://www.advancedmcode.org

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