I'm trying to solve the following equations using ODE45 but I'm not confident that my codes work correct. So please teach me whether the codes are correct or not, and if not, teach me how I can analyze the equation numerically.
Tf’ + f = Gx
% I know ode45 only can solve one oder differential equations so I did a change of variables. However I would rather avoid using this change because it’s hard to see x and f in a plotted graph with the new variable appearing on it.
% I did the following change [X=x’] so the equation becomes[ X=x’ ][mX’+DX+Kx=-f][Tf’ + f = Gx]
%F(1) matches x, F(2) matches X, F(3) matches f