×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Simple 3D plot
2

Simple 3D plot

Simple 3D plot

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources