Question: How to do C and D in MATLAB? PROBLEM 1. The Taylor series expansion for the exponential function is given below: 2 2!3! This can
How to do C and D in MATLAB?
PROBLEM 1. The Taylor series expansion for the exponential function is given below: 2 2!3! This can also be written in the following form with the summation symbol 2: n 0 NOTE 1 MATLAB has a built-in function called factorial() n' = n(n-1)(n-2)...-factorial(n) NOTE 2: Each term of the Taylor series can be represented by the formula which is on the right side of the symbol. The terms are calculated for all the integer values between n=0 to N and they are added together to find ex for a given x value. 1A. Write a script using while_loop to calculate e5 for N-10. Print the result using fprintfO. 1B. Write script to calculate e5 using exp function. Print the result using fprintf() 1C. Write a script to find the percent error between the two results from 1a and 1b. The percent error can be calculated using the following formula. e* (using while loop) - e*(using exp) excusing exp) Percent Error - 100 to calculate e5 with a percent error less than 1D. Write a script using 0.001%. Print the percent error and the number of iterations that was needed for the code to have a percent error less than 0.001%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
