필터 지우기
필터 지우기

How to check order of accuracy of Euler forward

조회 수: 1 (최근 30일)
Katara So
Katara So 2021년 3월 4일
Is there a general code for how to check the accuracy order of Euler forward?
I have the odes:
odes = @(t,y) [0.272 - 0.00136*y(1) - 0.00027*y(1)*y(4);
2.7e-5*y(1)*y(4) - 0.00136*y(2) - 3.6e-2*y(2);
2.43e-4*y(1)*y(4) + 3.6e-2*y(2) - 0.33*y(3);
100*y(3) - 2*y(4)];
for i=1:n
y0(:,i+1)= y0(:,i)+dt*(odes(t(i),y0(:,i)));
i=i+1
end
with
n=200;
dt=120/n;
t=0:dt:120;
y0 = [200; 0; 0; 4e-7];
How can I determine the order of accuracy?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by