Plot the cylinder in Matlab

You can post your problem related to MATLAB Projects here. We will try our best to help you out.
Joined:Sat Feb 18, 2017 5:57 am
Plot the cylinder in Matlab

Post by Armistead » Mon Mar 06, 2017 12:15 pm

can anyone help me to solve the task: Plot the cylinder ((x-1)^2)/4 + y^2=4 for -1<=z<=1 by using the cylinder function. The cylinder shall begin in z=-1 and end in z=1

I have read through the help cylinder function in Matlab but cant seem to figure out how to get it right.

I tried to put figure [X,Y,Z]= cylinder((x-1)^2/4+y^2) surf [X,Y,Z] axis square

Post Reply