How to make a graphic 3d(surface) from 3 vectors in MATLAB.
Show older comments
I have for example X = [ 1 3 4 5 6] , Y = [ 2 3 4 5 6] and Z =[ 1 2 3 2 1] and i want to make a surface graphic.
They are in orders, each column represents one point in the coordinate ystem xyz.
I saw many posts but couln´t find the solution.
Thank you in advance.
1 Comment
Sara
on 24 Jul 2014
Maybe plot3?
Answers (1)
Azzi Abdelmalek
on 24 Jul 2014
To plot a surface you need more data,
Example
x=1:4
y=1:4
[xx,yy]=meshgrid(x,y)
zz=xx.^2+yy.^2 % for example
mesh(xx,yy,zz)
1 Comment
Franco Gentili
on 24 Jul 2014
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!