MATLAB: How to get numerical value from symbolic variables equation

equationMATLABsymbolicSymbolic Math Toolbox

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

Best Answer

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