Question
Using youre the factorial function in MATLAB (e.g. z = factorial(3) yields z = 6) , write a program which will use the Maclaurin series
Using youre the factorial function in MATLAB (e.g. z = factorial(3) yields z = 6) , write a program which will use the Maclaurin series defined above to approximate with specified values of n and x. The program should also print to the screen the percent error of the estimated value with respect to a calculation of the actual value. Revisit your flow diagram created in the Python 3 assignment. Make notes on changes needed for MATLAB. You do not have to turn in the flow diagram for this assignment. Note to ask user to input n, and x in this order.
This time, write a program that will generate as many terms as is necessary to approximate the function to a specified level of accuracy (i.e., below an percent error threshold) at a specified value of x. Additionally, print to the screen the number of terms the series must contain before the target accuracy is achieved. As in part A, revisit the flow diagram previously created for Python 3. As with Part A, you are not required to turn the flow diagram in for this assignment. Note that ask user to input x, and target error threshold in this order.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started