MATLAB: How to code surf graph

graphplotsurf

X=0:0.01:0.2;
Y=0:0.01:0.2;
T=a matrix with 441*1 dimension that start from 22 to 36
Z=zeros(441,1);
Z=T;
how can i code a surf graph (X , Y,Z)?

Best Answer

x = 0:0.01:0.2 ; nx = length(x) ;
y = 0:0.01:0.2 ; ny = length(t) ;
[X,Y] = meshgrid(x,y) ;
Z = reshape(z,nx,ny) ;
surf(X,Y,Z)
Related Question