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
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 CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by