MATLAB: Defining coordinates and points in a 3D plot 3d plots How do I define the length of x (0 to 1m) and y (0 to .5m) with a grid of 101 by 51 points? This is a 3D plot Best Answer xv = linspace(0, 1, 101);yv = linspace(0, 0.5, 51);[X, Y] = ndgrid(xv, yv);Z = sqrt(sin(X)) .* cos(Y-X).^2;surf(X, Y, Z, 'edgecolor', 'none'); Related SolutionsMATLAB: How to make a cylinder with base (2,0,1) and radius 2 use [x,y,z]=cylinder(radius)where radius=2; Then to move the base to (x0,y0,z0)=(2,0,1) and also make the height of the cylinder to be h=10 do this% Radius =2R=2;%Base at (2,0,1)x0=2;y0=0;z0=1;% Height = 10h=10[x,y,z]=cylinder(R)x=x+x0;y=y+y0;z=z*h+z0;% to plotsurf(x,y,z) MATLAB: How to make this plot look nicer You might trysurf(X, Y, real(Z),'FaceColor','interp','EdgeColor','none');ylim([0 2])for starters... Related QuestionHow to plot cos(x) + cos(y) + cos(z) = 0Need help with 3D surface plot of complex functionHow to plot two different 3D graphics togetherHow can i plot it
Best Answer