a question on ode23 solver
Show older comments
Hi, I am using ODE23 solver in Matlab.
After inputting the following
t = linspace(0,10);
y0 = 0.5;
u = 1.0;
z = ode23(@(t,y)first_order(t,y,u),t,y0);
time = z.x;
y = z.y;
plot(time,y)
and
function dydt = first_order(t,y,u)
tau = 5;
K = 2.0;
dydt = (-y+K*u)/tau;
end
The output is the plot of time versus y. I wanted to have a plot of y' and t so that I can make an analysis of the ODE without having to solve it. Is there a way of doing it?
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!