[solved]-Need Help Matlab Using Recursion Please Notice Use Recursion Iteration Allowed Thank Help Q39003273
Need help on MATLAB by using Recursion!!!
Please notice that Only use Recursion.
Iteration is not allowed!!!
Thank you for your help!
Function Name: recyclePi
Inputs: 1. (double) The number of fractions to use in yourapproximation
Outputs: 1. (double) Your approximation of pi rounded to 10decimal places.

There are many ways to calculate , and one of them is by using the continued fraction representation for (4/) + 1, as shown below. You might notice that it has a very regular pattern. Each base number of the numerator increases by 2, starting from 1, with every nested fraction. = +1 = 2 + it at 2+ 2+ 3+ E 32 52 121_ 72 21 112 2+ 2 + … Function Description: Using the continued fraction of (4 / 1) + 1 given above, write a function that approximates using the number of fractions given as the input. The number of fractions is determined by the number of fraction bars that appears when the continued fraction is written. Example: >> approximation = recyclePi(3) >> approximation => 2.8952380952 12π a =+1= 2 +- 2+ 12 2 + — – 1 2 + 32 2+ 2+52 2+52 Notes: • The continued fraction yields the approximation for (4/) + 1, but your final solution should be an approximation of pi itself. • Don’t be surprised if the approximations aren’t that close. • Round your final approximation to 10 decimal places, and use isequal() to make sure it matches the solution output! Show transcribed image text There are many ways to calculate , and one of them is by using the continued fraction representation for (4/) + 1, as shown below. You might notice that it has a very regular pattern. Each base number of the numerator increases by 2, starting from 1, with every nested fraction. = +1 = 2 + it at 2+ 2+ 3+ E 32 52 121_ 72 21 112 2+ 2 + … Function Description: Using the continued fraction of (4 / 1) + 1 given above, write a function that approximates using the number of fractions given as the input. The number of fractions is determined by the number of fraction bars that appears when the continued fraction is written. Example: >> approximation = recyclePi(3) >> approximation => 2.8952380952 12π a =+1= 2 +- 2+ 12 2 + — – 1 2 + 32 2+ 2+52 2+52 Notes: • The continued fraction yields the approximation for (4/) + 1, but your final solution should be an approximation of pi itself. • Don’t be surprised if the approximations aren’t that close. • Round your final approximation to 10 decimal places, and use isequal() to make sure it matches the solution output!
Expert Answer
Answer to Need help on MATLAB by using Recursion!!! Please notice that Only use Recursion. Iteration is not allowed!!! Thank you f… . . .
OR

