Extracting values from sym matrix solutions
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Shahabas Muradh
el 20 de Jun. de 2019
Comentada: Shahabas Muradh
el 20 de Jun. de 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 comentarios
Respuesta aceptada
madhan ravi
el 20 de Jun. de 2019
m.Nv11 % would give you the value , also use double() to get the result in decimal form
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!