Matlab Assignment Help

3D Plotting Task using Matlab

Task: 

The popular amusement ride known as the corkscrew has a helical shape. The
 parametric equations for a circular helix are:           
 x = a cos t
 y = a sint t
 z = b*t
 Where a is the radius of the helical path and b is a constant that determines the
 tightness of the path.
 For this homework, plot the x, y, and z variables.
 Use 0 ≤ t ≤ 10*pi, b = 0.1 and a = 1.25. Print the graphs, label your axes and title of
 the graph.

Solution:

clc
 clear all
 close all

% given values of constants :
 t = 0:0.1:10*pi;
 b = 0.1;
 a = 1.25;

% given equations of x , y , z :
 x = a * cos(t);
 y = a * sin(t);
 z = b * t;

% 3D plotting :
 plot3(x,y,z,'b','linewidth',2)
 xlabel('x-axis','fontsize',15)
 ylabel('y-axis','fontsize',15)
 zlabel('z-axis','fontsize',15)
 title('3D Plot Helix','fontsize',20)
 grid on