Evaluating a symbolic function

后端 未结 2 476
猫巷女王i
猫巷女王i 2021-01-16 20:21

I want to find cos(5). Why is this expression invalid:

syms x
f=sin(x)
disp(diff(f)(5))

The error is

Line:         


        
2条回答
  •  既然无缘
    2021-01-16 21:04

    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.

提交回复
热议问题