Extracting values from sym matrix solutions
9 views (last 30 days)
Show older comments
Shahabas Muradh
on 20 Jun 2019
Commented: Shahabas Muradh
on 20 Jun 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 Comments
Accepted Answer
madhan ravi
on 20 Jun 2019
m.Nv11 % would give you the value , also use double() to get the result in decimal form
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!