Where is the mistake? Taylor Series in matlab?

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

VBBV
VBBV il 7 Gen 2023
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 Commenti
Torsten
Torsten il 7 Gen 2023
Modificato: Torsten il 7 Gen 2023
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).

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by