Matlab Quick Start 82: Series and Taylor Expansion
1.Programming Example (1) Calculate the sum of the series, compute the power seriesxn/n!(n takes values from0 to∞) sum function Program: syms n x f=x^n/factorial(n) symsum(f,n,0,inf) Running Result: f = x^n/factorial(n) ans = exp(x) (2) Calculate the Taylor expansion, computef=exp(x) atx=1 with5th order approximate Taylor expansion syms x y f=exp(x) taylor(f,x,’ExpansionPoint’,1,’Order’,5) Running Result: f = exp(x) … Read more