Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.35 KB File ID: #5153

roundcfrac.m

by David Terr

 

07 Jun 2004 (Updated 30 Jul 2004)

Computes the "round continued fraction" of a given complex number.

| Watch this File

File Information
Description

This function computes the "round continued fraction" of a given complex number, defined similarly to the ordinary continued fraction except one rounds the quotient at each step instead of using the floor. This allows generalization to complex numbers, whose remainders after rounding lie in the square [-1/2, 1/2) + [-1/2, 1/2) i.
Coefficients are returned as a column vector.

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.
Please login to add a comment or rating.
Updates
07 Jul 2004

I fixed a bug caused by using the Hermitian conjugate instead of the transpose to compute the result. (Previous result was the complex conjugate of the correct result.)

20 Jul 2004

I modified the method used for rounding
remainders. I now round half-integers to
nearest integer with least absolute
value.

30 Jul 2004

I added two columns to the result, the second and third being the numerators and denominators of the round rational convergents of x respectively, both possibly negated.

Tag Activity for this File
Tag Applied By Date/Time
continued fraction David Terr 22 Oct 2008 07:22:54
round David Terr 22 Oct 2008 07:22:54
complex David Terr 22 Oct 2008 07:22:54
number David Terr 22 Oct 2008 07:22:54

Contact us at files@mathworks.com