Solve system of equations when symbolic vector is referencing its own elements?
Afficher commentaires plus anciens
I have a script that prints out a symbolic vector "a" in terms of its elements a(1),...,a(n):
a =
2610.0 - 0.0001*a5 - 1.0e-6*a7 - 0.01*a3
- 0.02*a4 - 0.0003*a6 - 3027.0
1176.0 - 0.0007*a7 - 0.03333*a5
266.1 - 0.05*a6
- 0.07*a7 - 322.0
64.24
-1.701
"a" is a system of equations where the elements of "a" reference other elements of "a", e.g. a(2) references a(4) and a(6):
a(2) = - 0.02*a4 - 0.0003*a6 - 3027.0
I want to write a(1),a(2),...,a(n) without any symbols appearing on the right-hand side. In other words, I want to substitute numerical values into the elements of "a".
I've tried solve(), vpasolve(), and subs() but I can't format the output to replace the symbols inside each element.
What am I doing wrong?
Thanks,
Michael
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!