Question: Here is a Taylor Series: , valid for . ( a ) Write a local function ( within the same function file - - see
Here is a Taylor Series: valid for
a Write a local function within the same function file see the template below function zmyfacta that computes the factorial of a number, eg:
Do not use MATLAB's builtin factorial function, build your own from scratch, possibly but not necessarily using using a for loop. Protip, you can still compare the results of your function to MATLAB's in the command window to confirm it is working right.
b The main function will be function yerrtruncerrxN which has as inputs: x the value pluggedin to the above expression; and N the number of terms in the Taylor Series. The outputs of this function are y the evaluation of the Taylor Series at x through N terms; and err, the truncation error of the Taylor Series. You may use MATLAB's builtin sqrt to determine the "true value", and should report the err as a relative error as a decimal, not a percentage
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
