Explicite Euler and convergence
조회 수: 13 (최근 30일)
이전 댓글 표시
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
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 Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!