Using the Symbolic toolbox, Matlab seems to arbitrarily determine whether or not to return a solved value when a concrete value is substituted in a formula.
>> syms x>> f(x) = 1/(5+4*cos(x))>> f(0)ans = 1/9>> f(1)ans = 1/(4*cos(1) + 5)
Why isn't it solving for f(1) ? I'm guessing its because I'm working symbolically, so I can substitute a second equation as x, but how I can force Matlab to return a concrete value?
EDIT: I tried double(f(1)) and that seemed to work. Would that be considered best practice here?
Best Answer