%Matlab code for creating 3d cylinder
clear all
close all
%parametization of x and y
%let x=r*cos(theta); y=r*sin(theta);
%here r= 1; and theta=0 to 2*pi;
%all theta values
theta=linspace(0,2*pi,100); r=1;
x=r*cos(theta); y=r*sin(theta);
%All X and Y and Z
X(1,:)=x; X(2,:)=x;
Y(1,:)=y; Y(2,:)=y;
%Value of z is from 0 to 4
Z(1,:)=zeros(length(x),1);
Z(2,:)=4*ones(length(x),1);
%plotting the cylinder
surf(X,Y,Z)
axis square
xlabel('X')
ylabel('Y')
zlabel('Z')
%title of the graph
title('Plotting of cylinder')
%viewpoint of the plot
v = [5 5 5];
view(v)
%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%
1. Write an M-file that uses parametric equations to draw the portion of the cylindery21 for 0 < z < 4. Include the following in your output: Labels for the three axes. ·Axes set so that the cy...