how to get numerical value from symbolic variables equation

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..?

 Accepted Answer

iwant = subs(Eqn,T(3)) ;
iwant = double(iwant) ;
You have to substitute T(3) in the equation.

More Answers (1)

% defining T1, T2, T3, T4, T5
T = sym('T',[1 5]);
Eqn = 5*T(3);
T(3)= 6;

Categories

Community Treasure Hunt

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

Start Hunting!