How to solve second order inhomogeneous equations using ode45

I have the following ODE for a vibrational response:
526.87x''+497x'+47000x=940sin(10pi*t)
with initial conditions x(0)=0.1099,x'(0)=0
I have been instructed to solve this numerically using ODE45 over 50 time periods but I am unsure how to write this as a function which ODE45 will accept, partly because it is inhomogeneous but also because it is second order.

Answers (1)

fun=@(t,y)[y(2);(940*sin(10*pi*t)-47000*y(1)-497*y(2))/526.87];
Best wishes
Torsten.

Categories

Asked:

on 15 Mar 2017

Answered:

on 16 Mar 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!