comparison scripts/general/rat.m @ 10821:693e22af08ae

Grammarcheck documentation of m-files Add newlines between @item fields for readability.
author Rik <octave@nomad.inbox5.com>
date Mon, 26 Jul 2010 21:25:36 -0700
parents be55736a0783
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
10820:c44c786f87ba 10821:693e22af08ae
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {@var{s} =} rat (@var{x}, @var{tol}) 20 ## @deftypefn {Function File} {@var{s} =} rat (@var{x}, @var{tol})
21 ## @deftypefnx {Function File} {[@var{n}, @var{d}] =} rat (@var{x}, @var{tol}) 21 ## @deftypefnx {Function File} {[@var{n}, @var{d}] =} rat (@var{x}, @var{tol})
22 ## 22 ##
23 ## Find a rational approximation to @var{x} within the tolerance defined 23 ## Find a rational approximation to @var{x} within the tolerance defined
24 ## by @var{tol} using a continued fraction expansion. For example, 24 ## by @var{tol} using a continued fraction expansion. For example:
25 ## 25 ##
26 ## @example 26 ## @example
27 ## @group 27 ## @group
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))))) 29 ## rat(e) = 3 + 1/(-4 + 1/(2 + 1/(5 + 1/(-2 + 1/(-7)))))