フィルターのクリア

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 Center および File ExchangeAssembly についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by