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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by