Where is the mistake? Taylor Series in matlab?

1 回表示 (過去 30 日間)
Karl-JR
Karl-JR 2023 年 1 月 6 日
編集済み: Torsten 2023 年 1 月 7 日
Hi everyone
i want to use taylor in matlab but i seem to have made a mistake here
here:
syms T
alpha = 0.056;
beta = 0.0000186;
R = 2000;
(-100<T) && (T<200)
f = R*(alpha+0.0078*(T-25)+beta*(T-25)^2);
taylor1 = taylor(f,'Order',1);
pretty(taylor1)
and i want to find out for T = 80
It says "Conversion to logical from sym is not possible." Can somebody correct or at least tell me what i did wrong

採用された回答

VBBV
VBBV 2023 年 1 月 7 日
syms T
alpha = 0.056;
beta = 0.0000186;
R = 2000;
f = R*(alpha+0.0078*(T-25)+beta*(T-25).^2);
f = subs(f,T,80);
taylor1 = taylor(f,'Order',1);
pretty(taylor1)
19969153862112801076895 ----------------------- 18446744073709551616
  3 件のコメント
Karl-JR
Karl-JR 2023 年 1 月 7 日
Thanks a lot🙏
Torsten
Torsten 2023 年 1 月 7 日
編集済み: Torsten 2023 年 1 月 7 日
You can't substitute T = 80 before you use "taylor".
I think the aim of the exercise is to see how well the Taylor series of order 1 approximates f(80).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by