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. Related SolutionsMATLAB: Solve for a variable in terms of specific other variables syms x(t) y(t) eq1 = x == y+2; deq = diff(eq1)deq(t) = isolate(deq, diff(y))ans = subs(ans, diff(x),5)ans = MATLAB: How to use function equationTomatrix in matlab2012 b.? it shows error for following code The routine name is equationsToMatrix with a lower-case 'e' and with plural 'equations' Related QuestionAdding numbers to an arrayHow we can define piecewise function in matlabHow to use “eig” in symbolic variables
Best Answer