MATLAB: Plotting the solutions of a differential system with numerical ways

differential equationsodeode45solve

Hi, i'm trying to plot the solutions of a differential system with a numerical method, i don't know how to do this, does anyone know how to do in matlab with an example ?
This is my system:
dx/dt=((3x+2)/(5y+x)) +3*x dy/dt=3*x*y-5y
Thanks you very much !!!

Best Answer

Yep, take a look:
function my_EOM()
IC = [-1 -1];
[t,qsol] = ode45(@EOM,[0 1],IC);
plot(t,qsol)
xlabel('t')
ylabel('x, y')
grid
end
function dqdt = EOM(~,q)
x = q(1);
y = q(2);
dqdt = [((3*x + 2)/(5*y + x)) + 3*x; ...
3*x*y - 5*y];
end