Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If I am asking for a matlab code in a question you should copy-paste the text fr

ID: 3663328 • Letter: I

Question

If I am asking for a matlab code in a question you should copy-paste the text from the.m file that corresponds to that question. If I am asking for a written explanation, then you should submit a the written explanations.

Question 2 (Using MATLAB command window or MATLAB Script) The following equation can be used to compute values of y as a function of y be-ar sin (br) (0.012r 0.15r3 0.075r2 2.5r) (1) b 5, and r is a vector holding values from 0 to T/2 in increments of or T/40. Use Eq. to calculate y and z y. 2 (Matlab notation for inner product). Generate a labeled plot of r versus y and a versus 2. Include a legend on the plot. For y use a 1.5-point, dashdotted red line wit 14-point, red-edged, white-faced square-shaped markers. For 2, use a standard-sized (default) solid blue line with standard-sized, blue-edged, green-faced circle markers.

Explanation / Answer

CODE

  
a=2;b=5;

%Generate x,y and z vector
  
x=0:pi/40:pi/2;

y=b*exp(-a*x).*sin(b*x).*(0.012*x.^4-0.15*x.^3+0.075*x.^2+2.5*x);

z=y.^2;

%Calculate transpose

w=[x' y' z']

%Plot the vectors

plot(x,y,'-pr','LineWidth',1.5,'MarkerSize',14,...'MarkerEdgeColor','r','MarkerFaceColor','w')

plot(x,z,'-sb','MarkerFaceColor','g')

xlabel('x');ylabel('y, z');legend('y','z')