Solve a variable-size array of linear eqns
Ältere Kommentare anzeigen
Hi,
I need to solve some (between 2 and 20, say) linear equations. Up til now I calculate the expressions in a loop, saving them in an array, e.g.
6
3 + 2*Y1
10 +0.5*Y1 - 3*Y2
and then I manually run:
A = solve('Y1=6','Y2=3+2*Y1','Y3=10+0.5*Y1-3*Y2','Y1','Y2','Y3')
I want to be able to save any number of these expressions and pass an array of them as input to the 'solve' function, so something like:
A = solve(Y)
Is this possible?
Thanks
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!