MATLAB Answers

Solving linear equations at each iteration in a for loop.

11 ビュー (過去 30 日間)
LUIS FERNANDO PAZLOPEZ
LUIS FERNANDO PAZLOPEZ 2020 年 9 月 8 日
コメント済み: Hiro 2020 年 9 月 8 日
could you give an example of a code where I solve a system of linear equations (4x4) at each iteration during a for loop. For example: if there are 1000 iterations, at each step the system must be solved.

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Hiro
Hiro 2020 年 9 月 8 日
what is (are) your problems?
let me know where you got stuck please.
  • programming?
  • solution (mathematical expression)
in MATLAB, linear problem is solved by just using "\".

  2 件のコメント

LUIS FERNANDO PAZLOPEZ
LUIS FERNANDO PAZLOPEZ 2020 年 9 月 8 日
I am solving a system of coupled differential equations with the runge kutta method. When creating the for loop, at each iteration, I need to solve a system of linear equations (4x4) and take the results to be used in another equation of the loop.
Hiro
Hiro 2020 年 9 月 8 日
It sounds that you have difficulties in programming with MATLAB, am I right?
The algorithm is relatively straightfoward and if you are just familiar with MATLAB, I'm sure you can do it in a blink of an eye.
I would reccomend that you should start from scratch -
there are some free trainings available for you:

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by