How can i transform a symbolic variable to numbers?

1 回表示 (過去 30 日間)
masoud jiryaei
masoud jiryaei 2019 年 9 月 4 日
コメント済み: madhan ravi 2019 年 9 月 4 日
I have a matrix in symbolic variable : A=[1 2 3 ; 4 5 6 ;7 8 9]
now I want to transform it to the numerics (a real matrix).

採用された回答

madhan ravi
madhan ravi 2019 年 9 月 4 日
Use subs() and then use double()
doc subs
doc double
  2 件のコメント
masoud jiryaei
masoud jiryaei 2019 年 9 月 4 日
How?
Can you show me?
madhan ravi
madhan ravi 2019 年 9 月 4 日
syms x y % an example
A = [x+2, 2+y; 3*x*y, 4*y^2]
v = [2,3]
subs(A,{x,y},{v(1),v(2)}) % here's what happens is that x symbolic variable is substituted with 2 and 3 for y

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by