How to set up a system of linear equations with loop and solve it?
2 ビュー (過去 30 日間)
古いコメントを表示
There is a system of linear equations with 1000 equations and 1000 variables. The 1000 variables are: x(1),x(2),...,x(999),b. The 1000 equations are: 6*x(i)+(1000-i)*(x(i+1)-x(i))-5*x(i+500)=1 (i=0,1,...,499), and x(i)=1+b*(2/3-i*2/3000)^6 (i=500,501,...,999), where x(0)=0.8. How to program this system of linear equations and solve it?
3 件のコメント
Torsten
2018 年 5 月 18 日
編集済み: Torsten
2018 年 5 月 18 日
If you understood the solution of the two ODEs that are coupled at x=1/3, you should also come up with a solution of this linear system of equations that is coupled at i=500.
Hint:
The "real" unknown is b which can be determined by making x(500) from the first recursion equal x(500) from the second recursion.
Best wishes
Torsten.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!