I want to make a 3d mesh graph in Matlab and I have three 1 dim arrays as following
x={1,2,3,4,5} y={6,7,8,9,10} z=(11,12,13,14,15}
Note: I have found lot of material regarding Mesh Graphs and mostly using function or single values. I need it for three 1 dimensional arrays.
If x
and y
are the values in plane-direction, then you need to have a 2d- z
-array, because otherwise your coodinates are not fully defined. Every point in the plane needs a corresponding z-value. Therefore the following works:
x = [1 2 3]; y = [4 5 6]; z = [7 8 9; 10 11 12; 13 14 15];
mesh(x,y,z);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.