I want to find cos(5). Why is this expression invalid:
cos(5)
syms x f=sin(x) disp(diff(f)(5))
The error is
Line:
Y = cos(x) will simply provide the cosine value of x. Or all the x.
I think in your code: disp(diff(f(5))) should work.