Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple 3D plot 2

Status
Not open for further replies.

komlan

Computer
Jun 2, 2005
1
Hi everyone,

I'm new to MatLab and to this forum, and so my question may seem trvial.

I need to plot a 3D figure from 3 vectors x, y, z. The 3 vector are related simply by order of their elements, that is, each point of my plot will have coordinate (x(i), y(i), z(i))

I checked the MatLab help for functions such as mesh and surf but they seem to be suitable only for close forme expression as in the following example.

[X,Y] = meshgrid(-2:.2:2, -2:.2:2);
Z = X .* exp(-X.^2 - Y.^2);
surf(X,Y,Z)

[x and y are transformed into matrix with meshgrid and Z is generated by calling some funstion f(X,Y)]
The problem in my case in that the x,y,z vectors are experiment data and so I do not generate z with x and y.

Am I missing the whole thing? Can anybody help please?

Thanks


Komlan
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor