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

MATLAB HELP! 3. Set c = 0 in LABO6ex2, n. (a) Explain what happens. What is the

ID: 3866572 • Letter: M

Question

MATLAB HELP!

3. Set c = 0 in LABO6ex2, n. (a) Explain what happens. What is the maximal amplitude What is the value of yielding the maximal amplitude in the forced solution? How does this value compare to (b) Run LAB06ex 1.n with c = 0 and w equal to the ville found in part (a). Comment the behavior of the solution Include the graph Beats when c = 0 and w the solution (1.6.2) to (1.6.1) reduces to y(t) = c1 cos(wot) + c2 sin(wot) + C cos(wt-a) If the initial conditions are set to zero, the solution reduces to which can be rewritten as 2016 Steania Tracogna, SoMSS, ASU MATLAB sessioas when w is close to wo we have that w +ws large in comparison to Iwo-wl. Then sin(wo +w)t) is a very rapidly varying function, whereas sin)t) is a slowly varying function If we define A(t) = 2C sin (n-aj), then the solution can be written as y(t) = A(t) sin +w)t and we lnay interpret it as a rapidly oscillating function with penod T = L, but with a slowly varying amplitude A(t). This is the pbenomenon known as beats Note that A(t) and -A(t) are the so-called "envelope functions". The period ofA(t) is thus the length of the beats i 4. To see the beats phenomenon, set c = 0 and w = 2.8 in LAB06ex1. Abo extend the interval of

Explanation / Answer

function LAB06ex1 clc omega0 = 3; c = 1; omega = 2.4; param = [omega0,c,omega]; t0 = 0; y0 = 0; v0 = 0; Y0 = [y0;v0]; tf = 50; options = odeset('AbsTol',1e-10,'relTol',1e-10); [t,Y] = ode45(@f,[t0,tf],Y0,options,param); y = Y(:,1); v = Y(:,2); figure(1) plot(t,y,'b-'); ylabel('y'); grid on; t1 = 25; i = find(t>t1); C = (max(Y(i,1))-min(Y(i,1)))/2; disp(['computed amplitude of forced oscillation = ' num2str(C)]); Ctheory = 1/sqrt((omega0^2-omega^2)^2+(c*omega)^2); disp(['theoretical amplitude = ' num2str(Ctheory)]); %---------------------------------------------------------------- function dYdt = f(t,Y,param) y = Y(1); v = Y(2); omega0 = param(1); c = param(2); omega = param(3); dYdt = [ v ; cos(omega*t)-omega0^2*y-c*v ]; function LAB06ex2 omega0 = 3; c = 1; OMEGA = 2:0.02:4; C = zeros(size(OMEGA)); Ctheory = zeros(size(OMEGA)); t0 = 0; y0 = 0; v0 = 0; Y0 = [y0;v0]; tf = 50; t1 = 25; for k = 1:length(OMEGA) omega = OMEGA(k); param = [omega0,c,omega]; [t,Y] = ode45(@f,[t0,tf],Y0,[],param); i = find(t>t1); C(k) = (max(Y(i,1))-min(Y(i,1)))/2; Ctheory(k) = ??; % FILL-IN end figure(2) plot(??); grid on; % FILL-IN xlabel('omega'); ylabel('C'); %--------------------------------------------------------- function dYdt = f(t,Y,param) y = Y(1); v = Y(2); omega0 = param(1); c = param(2); omega = param(3); dYdt = [ v ; cos(omega*t)-omega0^2*y-c*v ];