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 SolutionsMATLAB: I need to plot a surface plot from given X and Y coordinate matrixes and z as a constant value. Why do your X and Y have two columns if it means nothing?X = 0:3;Y = 0:3;Z = 0;[XX, YY] = ndgrid(X, Y);surf(XX, YY, repmat(Z, size(XX))); MATLAB: How to draw surface You can draw it using meshgrid and surf[X, Y] = meshgrid(linspace(-3,3));Z = exp(-X.^2-Y.^2);surf(X,Y,Z)shading interp Related QuestionDraw 3D object.write code in 2016a version. Help me,thanks!
Best Answer