Question: Q - 4 Plot the graph of y = cos 3 x for 0 x 1 using increments of 0 . 0 1 for x

Q-4 Plot the graph of y=cos3 x for 0 x 1 using increments of 0.01 for x.
a) Put a title as Graph of y=cos(5pi x) for your plot , label the x axes as x axis, label y
axis as y axis
b) Grid your plot
c) Save your plot as Fig1.fig. Close the plot you have drawn and plot the same graph
with red dashed line.
(Hint: Use help plot command for different line styles)
d) Plot the graph of z=sin(5pi x) on the same figure with green solid line.
e) Change the x axis boundaries as (-1,1) and y axis boundaries as (-1.8,1.8)
f) Title your plot as Multi plot, label x axis as x axis, label y axis as y axis, put a
descriptive legend for red dashed line as Cos curve and green solid line as Sin curve
g) Save your plot as Fig2.figMECH 100
HW 1
Q-1,A={5,9,13,17,21,-3,-5,-7,-9,-11}
a) Construct a row vector called a by using the colon notation (Hint: 3:8=345678)
with the number set given above.
b) Construct a row vector that has five elements by using the 2nd to 6th entries of the
vector a.
Q-2B={4,8,11,22,62},C={5,cos(),-3,7,25)
a) Construct a column vector called b by using the number set B.
b) Construct the column vector called c by using the number set C.
c) Construct a vector called d by adding 2 times c and 3 times b.
Q-3E={3,7,8,-4,log10(100)}
a) Construct a row vector called e by using the number set E and convert the row vector
into a column vector. (Hint: transposing)
b) Find the transpose of the vector b.
c) Find the vector t=5eT-2bT
d) Save your workspace as trial.mat (Workspace Window) and then clear the workspace.
Q-4 Plot the graph of y=cos3x for 0x1 using increments of 0.01 for x.
a) Put a title as 'Graph of y=cos(5x)' for your plot, label the x axes as 'x axis', label y
axis as 'y axis'
b) Grid your plot
c) Save your plot as Fig1.fig. Close the plot you have drawn and plot the same graph
with red dashed line.
(Hint: Use 'help plot' command for different line styles)
d) Plot the graph of z=sin(5x) on the same figure with green solid line.
e) Change the x axis boundaries as (-1,1) and y axis boundaries as (-1.8,1.8)
f) Title your plot as 'Multi plot', label x axis as 'x axis', label y axis as 'y axis', put a
descriptive legend for red dashed line as 'Cos curve' and green solid line as 'Sin curve'
g) Save your plot as Fig2.fig
(JUST Q4)
 Q-4 Plot the graph of y=cos3 x for 0 x 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!