how i fix this problem?

x=0.2;
exact=exp(x);
syms approx approxL approxI
Et=inline('(exact-approx)/exact)*100%','approx');
>> Et(3)
??? Undefined variable INLINE_INPUTS_.
Error in ==> inlineeval at 11
eval(INLINE_INPUTEXPR_);
Error in ==> inline.subsref at 27
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);

回答 (1 件)

Star Strider
Star Strider 2017 年 1 月 29 日

0 投票

Use symfun (in R2012a and later), instead of inline:
x=0.2;
exact=exp(x);
syms approx approxL approxI
Et=symfun(((exact-approx)/exact)*100 ,approx);

カテゴリ

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

タグ

質問済み:

2017 年 1 月 29 日

回答済み:

2017 年 1 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by