Extracting values from sym matrix solutions
조회 수: 11 (최근 30일)
이전 댓글 표시
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
채택된 답변
madhan ravi
2019년 6월 20일
m.Nv11 % would give you the value , also use double() to get the result in decimal form
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!