MATLAB: 3d plot with different length of x and y

3d plot

My x is a vector of length 21 and y a vector of length 101. I have calculated matrix z that is 21 x 101. I want to plot it in 3D. Surf and mesh commands require the same dimensions for the vectors. Is this possible?

Best Answer

As per the you data sizes, following is also allowed
contour3(x,y,z');
Note: I presumed that x and y are continously increasing or decreasing.