No BSD License  

Highlights from
cfrac.m

5.0

5.0 | 1 rating Rate this file 0 Downloads (last 30 days) File Size: 1 KB File ID: #4974

cfrac.m

by David Terr

 

20 May 2004 (Updated 30 Jul 2004)

cfrax(x,n) returns the first n terms in the contined fraction expansion of x.

| Watch this File

File Information
Description

% 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.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
22 Nov 2007 LE Shengtian

sehr gut code!!!

Please login to add a comment or rating.
Updates
28 May 2004

I fixed a bug in which the last coefficient wasn't being returned for rational x.

30 Jul 2004

I added two columns to the result. The second and third columns consist of the numerators and denominators of the rational convergents respectively.

Tag Activity for this File
Tag Applied By Date/Time
symbolic math David Terr 22 Oct 2008 07:20:27
contined fraction David Terr 22 Oct 2008 07:20:27
first David Terr 22 Oct 2008 07:20:27
coefficients David Terr 22 Oct 2008 07:20:27
terms David Terr 22 Oct 2008 07:20:27
real David Terr 22 Oct 2008 07:20:27

Contact us at files@mathworks.com