Finite Continued Fraction - MATLAB Cody - MATLAB Central

Problem 897. Finite Continued Fraction

Difficulty:Rate

Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. For more details, you could find help here: http://en.wikipedia.org/wiki/Continued_fraction

Example:

Inputs: x=pi; n = 10;

Output: y = [3 7 15 1 292 1 1 1 2 1];

Solution Stats

47.97% Correct | 52.03% Incorrect
Last Solution submitted on Oct 25, 2022

Problem Comments

Solution Comments

Show comments
Who Deserves Your Praise? Discover the New Contribution Widget!
...
We are excited to announce another update to our Discussions area: the...

Problem Recent Solvers35

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page