I generated this system diagram and have written the system of differential equations below it.
How can I implement an ODE solver to solve for the velocities and plot them vs Frequency?
Freq = 1:1000; omega = (2 * pi) * Freq;
time = 1; P0 = 1 * sin(omega * time);
Km = 100; Ks1 = 200; Ks2 = 300;
ms = 1; mm = 2;
Rm = 1000; Rs1 = 2000; Rs2 = 3000;
xdds = (1/ms) * (P0 - Rs1 * xds - Ks1 * xs - Rs2 * (xds - xdm) - Ks2 * (xs - xm));
xddm = (1/mm) * (-Rm * xdm - Km * xm + Rs2 * (xds - xdm) + Ks2 * (xs - xm));