Ode45 change of a value in the equations
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everybody, I'm new at matlab, and I have a problem with Ode45: This is my system of equations to solve:
[tout,yout] = ode45(@(t,y) EQS(y,m,T,FN,P,D,gamma,tau), ...
[0:number_of_steps],...
initial_condition)
dPdt = + m .* T .* FN .* P - gamma .* P
dNdt = - m .* T .* FN .* P + tau .* D
dDdt = + gamma .* P - tau .* D
Ode45 works perfectly for this system but I need to change the parameter T (a vector) after a certain number of steps. How can I do that? I have tried to place loops and statemetns into the function "EQS" but Ode doesn't care about them.
4 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!