how to get numerical value from symbolic variables equation

15 ビュー (過去 30 日間)
HEmant kuralkar
HEmant kuralkar 2017 年 6 月 13 日
回答済み: KALAIYARASAN K 2022 年 5 月 6 日
I have the following code
% defining T1, T2, T3, T4, T5
T = sym('T',[1 5]);
Eqn = 5*T(3);
T(3)= 6;
Now each time I call the value of Eqn it shows me 5*T(3)
How can I get a numerical value..?

採用された回答

KSSV
KSSV 2017 年 6 月 13 日
編集済み: KSSV 2017 年 6 月 13 日
iwant = subs(Eqn,T(3)) ;
iwant = double(iwant) ;
You have to substitute T(3) in the equation.

その他の回答 (1 件)

KALAIYARASAN  K
KALAIYARASAN K 2022 年 5 月 6 日
% defining T1, T2, T3, T4, T5
T = sym('T',[1 5]);
Eqn = 5*T(3);
T(3)= 6;

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by