필터 지우기
필터 지우기

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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by