comparison scripts/general/rat.m @ 7001:8b0cfeb06365

[project @ 2007-10-10 18:02:59 by jwe]
author jwe
date Wed, 10 Oct 2007 18:03:02 +0000
parents 65a28e9de0a5
children 93c65f2a5668
comparison
equal deleted inserted replaced
7000:e87f860624cc 7001:8b0cfeb06365
27 ## @example 27 ## @example
28 ## rat(pi) = 3 + 1/(7 + 1/16) = 355/113 28 ## rat(pi) = 3 + 1/(7 + 1/16) = 355/113
29 ## rat(e) = 3 + 1/(-4 + 1/(2 + 1/(5 + 1/(-2 + 1/(-7))))) = 1457/536 29 ## rat(e) = 3 + 1/(-4 + 1/(2 + 1/(5 + 1/(-2 + 1/(-7))))) = 1457/536
30 ## @end example 30 ## @end example
31 ## 31 ##
32 ## Called with two arguments returns the numerator and deniminator seperately 32 ## Called with two arguments returns the numerator and denominator separately
33 ## as two matrices. 33 ## as two matrices.
34 ## @end deftypefn 34 ## @end deftypefn
35 ## @seealso{rats} 35 ## @seealso{rats}
36 36
37 function [n,d] = rat(x,tol) 37 function [n,d] = rat(x,tol)