Question: wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given point using Taylor series. Write a script file called

 wnloads/HW5 pdf Create a MATLAB code to calculate function f (z)

wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given point using Taylor series. Write a script file called myTaylor.m and a function file called myFact.m to do the following: (a) The function myFact.m should return the factorial of a number when sent the number. In the script file: i. Set the starting point as r0-1 and fo = f(d)-6.049647 ii. Ask the user to enter his/her desired point and store it in x1 iii. Calculate the true solution for f(r1) and store it in TrueF1 iv. Calculate the first term of Taylor series at x1 and store it in TaylorF1 v. Calculate the true relative error of TaylorF1 and store it in TrueError vi. Use while loop and calculate next terms of Taylor formulation until the true relative error is less than 2%. (b) Once the next term is calculated, it should be added to the current value of TaylorF1 and the TrueError should be updated. i. Print the values of TaylorF1 and TrueError after each calculation ii. Count the number of Taylor formulation terms and print them (c) Run your program twice i. For x1 1.13 (you tan compare the results of this case with Question 2 ii. For one other x1 value of your choice. -IMG 6938JPG AIMG 6937 PG 4 5 6 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!