Taylor series approximation problem
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lingbai Ren
am 15 Sep. 2021
Kommentiert: Lingbai Ren
am 24 Sep. 2021
we are considering a Taylor series approximation of f(x) = e^(-x)
my questions is how to compute the Taylor Series approximation of f(x).
The requirements are: the code should take as input x_i, x_i+1, and the order, n.
The code should output the normalized true error e_T, at x_i+1
I'm totally lost where to start, hope to get some hints or help!
thanks!
0 Kommentare
Akzeptierte Antwort
Matt J
am 15 Sep. 2021
As an example,
syms x
T=taylor(exp(-x),x,7,'Order',4)
fn=matlabFunction(T)
fn(3)
You can of course find more examples in the documentation for taylor() and matlabuUnction()
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!