Extracting values from sym matrix solutions
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Shahabas Muradh
le 20 Juin 2019
Commenté : Shahabas Muradh
le 20 Juin 2019
I have a matrix E which contains algebraic equations.Now if I do m=solve(E),then i will get m containing the values of the variables in the algebraic equations.Now how to take these values in m for further calculation because if i print m ,then i am not getting the numeric values instead getting something else as shown below?
E =
[ Nv12/4 + Nv21/4 + 12 == Nv11, Nv11/4 + Nv13/4 + Nv22/4 + 25/4 == Nv12, Nv12/4 + Nv23/4 + 27/2 == Nv13]
[ Nv11/4 + Nv22/4 + Nv31/4 + 25/4 == Nv21, Nv12/4 + Nv21/4 + Nv23/4 + Nv32/4 == Nv22, Nv13/4 + Nv22/4 + Nv33/4 + 29/4 == Nv23]
[ Nv21/4 + Nv32/4 + 27/2 == Nv31, Nv22/4 + Nv31/4 + Nv33/4 + 29/4 == Nv32, Nv23/4 + Nv32/4 + 15 == Nv33]
>> m=solve(E)
m =
Nv11: [1x1 sym]
Nv12: [1x1 sym]
Nv13: [1x1 sym]
Nv21: [1x1 sym]
Nv22: [1x1 sym]
Nv23: [1x1 sym]
Nv31: [1x1 sym]
Nv32: [1x1 sym]
Nv33: [1x1 sym]
Here Nv12,Nv23,etc... are the variables of algebraic equation of which values I have to solve.
0 commentaires
Réponse acceptée
madhan ravi
le 20 Juin 2019
m.Nv11 % would give you the value , also use double() to get the result in decimal form
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!