Question: All four m-files must be compressed into a single ZIP file named ubi tname_PP1. zip, where ubitname is your UBITName. (Please do not ZIP files

 All four m-files must be compressed into a single ZIP file

All four m-files must be compressed into a single ZIP file named ubi tname_PP1. zip, where ubitname is your UBITName. (Please do not ZIP files ending in You must upload your ZIP file to UBlearns before the due date and time specified on UBlearns. You must write your own code and follow all instructions to get full credit. You are not allowed to use built-in MATLAB function factorial (n) or scripts like fibonacci.m found on the Internet. Write a MATLAB function named get_fac that accepts a non-negative integer, n (n > 0) and returns the factorial, n!, of that number using a for loop. Write a MATLAB function named get_fib that accepts a non-negative integer, k (k > 0) and returns the corresponding term, F_k, of the Fibonacci sequence using a while loop. Another convergent series is that of the reciprocals of the Fibonacci numbers, which sum to produce another irrational number called the reciprocal Fibonacci constant, or ip. (As an aside, note that the Fibonacci series-and thus ip-are intimately related to the golden ratio, 1.61803.) Write a MATLAB script named PPl_P3a that calls your function get_f ac to estimate e. Write a MATLAB script named PPl_P3b that calls your function get_fib to estimate Your estimates must be to at least 10 decimal places. (You'11 need to set a tolerance in each script to determine when to finish refining its estimate and exit the loop.)

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!