How to make a graphic 3d(surface) from 3 vectors in MATLAB.
1 view (last 30 days)
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.
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)
See Also
Categories
Find more on 2-D and 3-D 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!