フィルターのクリア

Solving 54 linear equations

1 回表示 (過去 30 日間)
charbel chemaly
charbel chemaly 2020 年 11 月 23 日
回答済み: Pier Giorgio Petrolini 2020 年 11 月 24 日
Hello, I am trying to solve 54 linear equations for the source panel method in Aerodynamics. I am using a for loop. These equations contain a symbolic variable lambda (the solution should be 54 lambdas of different values.
I tried using solve and vpasolve but it is taking a lot of time to compute. What should I do?.

採用された回答

Pier Giorgio Petrolini
Pier Giorgio Petrolini 2020 年 11 月 24 日
Hello, you can use the strong point of MATLAB that is operating with arrays.
I'm not sure I understand the probem you're facing but, it can be just one of the following two scenarios:
CASE 1) You're dealing with 54 equations, the unknown is just lambda for each of them.
You can rewrite your equations in form of arrays as it follows:
A*x = b ==> x = b./A, where "A" is a column vector constituted of constans, "x" is a column vector containing your lambda values and finally, "b" is the column vector of known terms.
CASE 2) You're dealing with a system of 54 equations.
It's quite the same but, in this case "A" is a 54 x 54 Matrix (see link below to understand how to compute it).
You can solve the system in taht way: x = b\A.
In both cases you don't need to use symbolic variables, this method is much faster.
You can find a reference at the following link: https://en.wikipedia.org/wiki/System_of_linear_equations
I hope it helps. Kind Regards,
PGP

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by