Question: Please provide the Matlab code to solve this question, thank you !!!! Consider the inhomogeneous equation with constant coefficients and non-elementary forcing function with parameter

Please provide the Matlab code to solve this question, thank you !!!!Consider the inhomogeneous equation with constant coefficients and non-elementary forcing function withPlease provide the Matlab code to solve this question, thank you !!!!

Consider the inhomogeneous equation with constant coefficients and non-elementary forcing function with parameter a y" +0.54' + 2y = cos(at), y(0) = y'(0) = 0). (a) Use ode45 to approximate the solution y(t) for a = 5 and plot the result for 0 0? Enter your approxi- mation as a vector of length 2 called Q3_max with the t value in the first entry and y value in the second. For example, if you find the maximum value is y = 2 when t = 1 then save Q3_max = [1 2]. (Note: the MATLAB function max may be helpful.) Hint: modify the following MATLAB script to use ode45 in part (a): k*u(1))/m]; F = @(t) cos(w*t); odefun = @(t ,u) [u(2); (F(t) c*u(2) [T,U] = ode45 (odefun, [0 tf], [x0 vo]); X = U(:,1); plot(T,X)

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!