Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Solution plotting for both Forward and BACKWARD euler for the flame propagation model
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I am trying to solve the flame propagation model dy/dt=y^2-y^3 with y(0)= 1/100 and 0<t<200, using both FORWARD and BACKWARD euler method with step size 0.01. But it has been giving me errors. How should I go about this? Please help I need this for my project
Thank you
Here are my codes for the Forward Euler
h=0.01;
y(0)=2
for n=1:N
t(n+1)=n*h
opts = odeset('RelTol',1.e-4);
y(n+1)= y(n)+h*(y.^2-y.^3);
end
plot(t,y)
1 Kommentar
Torsten
am 15 Nov. 2022
Don't repost the same homework assignment several times.
You got an answer here:
If something is unclear, continue to ask there.
Antworten (0)
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!