Question: Matlab Grader X Problem 4 - Plot a decaying cosine wave 4 solutions submitted (max: Unlimited) View my solutions Damped oscillations are commonly used to

Matlab Grader X Problem 4 - Plot a decaying cosine wave 4solutions submitted (max: Unlimited) View my solutions Damped oscillations are commonly usedMatlab Grader

X Problem 4 - Plot a decaying cosine wave 4 solutions submitted (max: Unlimited) View my solutions Damped oscillations are commonly used to describe physical systems such as mechanical vibrations and electrical circuits. The mathematical model used to describe a damped oscillation is a cosine multiplied by an exponentionally decaying amplitude of the form: y(t) = Ae-alcos (ot+0) where A is the initial amplitude with the same units as the physical quantity that is being modeled, a is the damping constant in units of inverse seconds, w is the radian frequency of the oscillation in radians/second, t is time in seconds, and is the phase shift in radians. The period T of the wave is related to the radian frequency by the formula T 21 Assume y(t) is a linear position measured in meters. Write a script that generates y-values for 200 equally spaced t-values spanning three periods of y(t) for a damped oscillation with the following parameter values: A = 10 m a= 0.25 -1 w = 1/2 rad/s . = 1/4 rad Assign the t values to a column vector variable tValues. Assign the y(t) values to a column vector variable yValues. Next use the plot command to generate a properly-labeled graph of y(t). Use MATLAB commands to add an appropriate title and axis labels to the figure. Solve this problem using vectorized code (i.e. use vectors and do not use a loop in your solution.) Assign the t values to a column vector variable tValues. Assign the y(t) values to a column vector variable yValues. Next use the plot command to generate a properly-labeled graph of y(t). Use MATLAB commands to add an appropriate title and axis labels to the figure. Solve this problem using vectorized code (i.e. use vectors and do not use a loop in your solution.) Script C Reset 10 MATLAB Documentation 1 A = 10; 2 a = 0.25; 3 omega = pi/2; 4 zhi = pi/4; 5 y =@(t)A. *exp(-a. *t). *cos(omega. *t+zhi); 6 T = 2*pi/omega; 7 tValues = [linspace(0.3*T,200)].'; 8 yValues = y(tValues); 9 hold on; 10 grid on; 11 plot(tValues, y Values); 12 title('Damping oscilation vs time'); 13 xlabel('Time(t)in seconds'); 14 ylabel('Amplitude'); 15 legend('y(t)')

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!