I know that I can easily plot a sphere using the sphere function, but I am trying to do it with the cylinder function. This is what I have so far, but I can't seem to get the function right.
clc;x1 = linspace(0,pi,100);y1 = linspace(0,1,100);z1 = linspace(0,2,100);[x2, y2,z2]=cylinder(x.^2+y.^2),200);figure(2);surf(x2, y2,z2);xlabel('X');ylabel('Y');zlabel('Z');colormap(jet)
Best Answer