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 ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by