Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 (oStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started