Why do I receive the error "??? No appropriate methods for function ..." when using symbolic functions?

When I execute the following command:
taylor('exp(-x)')
I receive the following error message:
??? No appropriate methods for function taylor.

 채택된 답변

In order to use a symbolic function in MATLAB you must first declare symbolic variables with the SYM command. Please try the following syntax:
syms x
taylor(exp(-x))
Alternately, if you have a numeric value in the variable x and you don't want to overwrite it:
x=0.5;
T=taylor(sym('exp(-x)'))
subs(T)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by