Question: PLEASE CODE USING MATLAB (STEP BY STEP) In a harmonic oscillator, the phase shift (phi) is defined in terms of the frequency ratio (omega) and
PLEASE CODE USING MATLAB (STEP BY STEP)

In a harmonic oscillator, the phase shift (phi) is defined in terms of the frequency ratio (omega) and damping ratio (zeta) as 2. arctan- (10 pts) Create an anonymous function (u, ) and call it for -[0, 0.1, 0.5, 1], and = 0.5 (15 pts) Use a for loop to generate 5 plots of against E [0,2] for = 0.05, 0.1, 0.2, 0.5, 1, on the same graph as shown below. Use the line styles and colors, title, legend and axes labels shown below a) b) Hints: Create a vector for damping ratio. Create cell vectors of strings for the line types and legend values (i.e. {'b-o', 'r->. }). Call the function (, ) within the 'for loop, in a plot command, save the legend value at each iteration into at cell using num2str and hold on Phase shift against frequency for different damping ratios 2 1.5 =0.2 =0.5 0.5 3 -0.5 -1 1.5 -2 0 0.2 0.4 0.6 0.8 1.2 1.4 1.6 18 2 (o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
