3. A SDOF system is given by mx+CX+kx = f(t) where m = 100 kg. c-25 N.s/m and k
ID: 1766349 • Letter: 3
Question
3. A SDOF system is given by mx+CX+kx = f(t) where m = 100 kg. c-25 N.s/m and k = 1200 Nm.rt) = 1.2 N. x(0) 0, and x (0) = 1. Find the state-variable equations and use MATLAB's ode15s to find the solution. Use the time span, [O 50] seconds. Generate an overlay plot depicting the state variables in the time span: the plot should have a legend and be properly labeled. (Submit your MATLAB code and plots for this problem to blackboard and then print and attach them as well with the rest of your paper-based submission.)Explanation / Answer
The following (more or less self-explanatory) MATLAB code suffices:
>>eqn2 = ’D2y + 8*Dy + 2*y = cos(x)’;
>>inits2 = ’y(0)=0, Dy(0)=1’;
>>y=dsolve(eqn2,inits2,’x’) y = 1/65*cos(x)+8/65*sin(x)+(-1/130+53/1820*14ˆ(1/2))*exp((-4+14ˆ(1/2))*x) -1/1820*(53+14ˆ(1/2))*14ˆ(1/2)*exp(-(4+14ˆ(1/2))*x)
>>z = eval(vectorize(y));
>>plot(x,z)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.