Extracting values from sym matrix solutions

11 vues (au cours des 30 derniers jours)
Shahabas Muradh
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.

Réponse acceptée

madhan ravi
madhan ravi le 20 Juin 2019
m.Nv11 % would give you the value , also use double() to get the result in decimal form
  1 commentaire
Shahabas Muradh
Shahabas Muradh le 20 Juin 2019
What if I want to get all the values in m to another matrix.No; of variables is not fixed,it will vary according to user demand

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by