Using SOLVE with large number of equations and variables

Is there a way to use the command X = solve([eqn1, eqn2, eqn3, [x1 x2 x3]) for very large number of equations and variables without typing explicitly :equ1, equ2, equ3 and x1,x2,x3? The equations are Kirchoff's loop and node equations and the variables are the currents.

댓글 수: 3

J. Alex Lee
J. Alex Lee 2020년 1월 2일
편집: J. Alex Lee 2020년 1월 2일
Edit: didn't see the rest of the question...I guess that depends on if there is a regular pattern in the circruit that would allow reducing your equations into a smaller set of rules.
Wouldn't the resulting set of equations be linear so that there would be no need to invoke a complicated solver?
Yes, there is a pattern. I have a square grid of resistors (all of them different from each other). I want to make the grid as big as I can (thousands maybe). Is there another method other than solve or linsolve? I have heard about iterative methods but I do not know how to get started.
Your problem seems not to be about solving the system (using direct versus iterative methods), but rather about the programming to sett up the problem. Also, I think I'm out of my depth if you are wanting to use symbolic toolbox.
Generally, if you have rules governing your equations, you can use things like loops to efficiently code them in.

댓글을 달려면 로그인하십시오.

 채택된 답변

Pujitha Narra
Pujitha Narra 2020년 1월 6일

0 개 추천

As far as I understand, you are looking for simpler way to solve the Kirchoff's loop equations.
In your case, it is right that you could use iterative methods. Especially Gauss-Seidel and Jacobian methods would be of great help for solving Kirchoff's loop equations as far as I know. These are good for sparse matrices.
The following link would lead you to a MATLAB File Exchange page which could help you get started with the above mentioned iterative methods. Please note that MATLAB File Exchange is community based and any further queries regarding the code can be directed to the author.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2020년 1월 2일

답변:

2020년 1월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by