cfrac.m
Version 1.0.0.0 (607 Bytes) by
David Terr
cfrax(x,n) returns the first n terms in the contined fraction expansion of x.
2.3K Downloads
Updated
30 Jul 2004
No License
% cfrac(x,n) returns the first n continued fraction coefficients of a given nonnegative real number x.
Warning: If n is set too large, fewer coefficients may be returned and the last coefficient may be incorrect, due to rounding errors.
Cite As
David Terr (2024). cfrac.m (https://www.mathworks.com/matlabcentral/fileexchange/4974-cfrac-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R12
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Calculus in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | I added two columns to the result. The second and third columns consist of the numerators and denominators of the rational convergents respectively. |