How do I solve two Ordinary Differential equations using Matlab?
Here are the two differential equations:
dx/dt = 5.18(1x)/T >Equation  1
dT/dt = 3.165(1x)+0.4(300T) >Equation  2
I want to solve them using Matlab.
In the Matlab editor write the following code:
function yp = programs(t,y) xx=y(1); tt=y(2); yp1=5.18*(1xx)/tt; yp2=3.165*(1xx)+0.4*(300tt); yp=[yp1;yp2]; Save this file as programs.m Then add it to the path by clicking the run button. Now to solve the equations type the following code in the workspace window: [t,y]=ode45(@programs,[0 5], [0,20]) [0 5] is the initial and final value of time (assuming that you are differentiating with respect to time). [0,20] is the initial values of the variables: x and T. To plot the results, you can use the plot function. Type the following code in the workspace window: plotyy(t,y(:,1),t,y(:,2)); 

