Explicite Euler and convergence
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a function with five variables and I use Explicite Euler methode to make a plot with all these ones. My code is like that:
function x = EulerExplicite(h,t0,tf,x0,f)
t = [t0:h:tf];
L = length(t);
x = zeros(size(x0,2),L);
x(:,1) = x0;
for i=2:L
x(:,i) = x(:,i-1) + h * f(t, x(:,i-1));
end
end
It must tend to a balance. I have to determine a condition that verified the balance we have. But I don't know how.
3 Kommentare
John D'Errico
am 19 Mär. 2020
Bearbeitet: John D'Errico
am 19 Mär. 2020
Yes, but we don't even see the text of the question. We don't know what is meant by balance. We don't even know the physical context of the equations, so the word balance is to us, essentially meaningless. Could this be a translation issue? That is, if English is not your main language, have you used balance in some context where it might mean something completely unexpected?
Ok, having said that, perhaps my best guess MIGHT be that this is some sort of mass balance thing, where the total mass must stay constant, and you are expected to show if that has indeed happened. In fact, this is a possible problem you might be posed, just to teach you that Euler's method can have problems in that respect. But that is just a wild and virtually random guess on my part.
Coould the intent to mean something about convergence? That is vaguely conceivable, but I don't think so, since then the word limit might have been used. Euler is not an iterative scheme that is used to runs until convergence.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!