I need to use the ODE45 function to plot the following ODE (shown below) with the initial conditions𝜃(0)=𝜋/2 rad and 𝜃(𝑡)=0.1 rad/s and 0 ≤ 𝑡 ≤ 10 seconds. One plot for𝜃(𝑡) when 𝛺=𝜋 and another when 𝛺=4𝜋.
theta'' + theta' + 10*cos(2pi*theta) = sin(omega*t)
Im having difficulty understanding how to create a function that can solve this using ode45. I was able to solve earlier ones when it was a simple linear 2nd ode- Homogeneous. Below is how I solved the other 2nd order.
[T, STATES] = ode45(@ode2_hw8, t, yinitial);
function [out2] = ode2_hw8 (t, state)