The natural exponential function can be expressed by
8
n! n=0
Determine e2 by calculating the sum of the series for:
n1=5, n2=15, and n3=25.
For each sum create a vector in which the first element if o,the increment is 1
and the last term is 5, 15 or 25. Then use element-by-element operations to xn create a vector with the elements Finally use the MATLAB built-in function n! SUM to add the terms of the series. Compare the values obtained with the value of e2 calculated by MATLAB.