Explicite Euler and convergence

13 次查看(过去 30 天)
Tixi
Tixi 2020-3-19
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 个评论
Tixi
Tixi 2020-3-19
It is what I am asked to do but I don't know what it means. I don't have more explanations.
When I see my plot, I can see a convergence, maybe it is that the balance ?
John D'Errico
John D'Errico 2020-3-19
编辑:John D'Errico 2020-3-19
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by