eulers method and relative error
14 ビュー (過去 30 日間)
古いコメントを表示
hi im new to matlab and have this question ,
Use Euler’s method to evaluate the solution to the system of differential equations over the first 20 hours. Use a step size of h = 15 minutes and examine the relative error between the numerical and analytical calculations.
these are the equations
1) R + k*x2(t) - k*x1(t)
2) k*x1(t) - (alpha + k) * x2(t)
values of aplha = 10
k = 50
and R = 100
can anyone help ?
3 件のコメント
Jim Riggs
2020 年 12 月 11 日
編集済み: Jim Riggs
2020 年 12 月 11 日
Well, I don't use the symbolic processing toolbox, so I don't have any advice regarding that.
But the reference to X1(0) and X2(0) may be the problem. If the numbers in the parenteses are subscripts, they must be positive, that would be what the error is indicating. A value of zero is not positive. Needs to be 1 or greater (integer or logical type)
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Linear Algebra についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!