expr2=coll​ect(EXPR,'​exp(-t)') Why is it wrong?

EXPR=str2sym('(x^2+x*exp(-t)+1)*(x+exp(-t))')
expr1=collect(EXPR)
expr2=collect(EXPR,'exp(-t)')
Why expr2 shows: sym.charToFunction (line 26) Invalid variable name

 採用された回答

madhan ravi
madhan ravi 2019 年 4 月 22 日
編集済み: madhan ravi 2019 年 4 月 22 日

0 投票

expr2=collect(EXPR,exp(-t)) % no single quotes around the second argument

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

製品

リリース

R2018b

質問済み:

2019 年 4 月 22 日

編集済み:

2019 年 4 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by