Sir, I am calling ode45 for integrating a diff equation say x'=(1/(H))*(2x)
Main Program:
x0=0.1; final_time=1; [t,x]=ode45(@myfunc,[0,final_time],x0);% ODE Call plot(t(:,1),x(:,1))% plotting the state variable main ends
Function Program:
function dv=myfunc(t,x) H=1.0; Te=2*x(1);% intermediate calculations/variables for my differential equations %The Differential Equation dv=[(1/(H))*(Te)];
But i want to plot the intermediate variables say Te in this case.But ode returns t,x alone.How to plot the intermediate variables that was used in the integration process.
Best Answer