Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Integration of a function
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi I have function:
dy/dt = A(1-y/B)*exp(C*y)
y(at t=0) = 0 y (at t = infinity) = 1
A,B,C are constants and y is an unknown function of t.
I would like to solve for y and plot it as function of t. (t is time). This will allow me to compare with experimental results.
Can you please help, I am not able to get started.
I look forward to your response
Antworten (1)
Torsten
am 19 Jun. 2018
function main
A=...;
B=...;
C=...;
fun=@(t,y)A*(1-y(1)/B)*exp(C*y(1));
tspan=[0 1];
y0=0;
[t,y]=ode45(fun,tspan,y0);
plot(t,y)
end
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!