Mercurial > octave-nkf
comparison src/pr-output.cc @ 7097:e8c94e473c68
[project @ 2007-11-02 17:24:23 by jwe]
author | jwe |
---|---|
date | Fri, 02 Nov 2007 17:24:24 +0000 |
parents | a1dbe9d80eee |
children | dd88d61d443f |
comparison
equal
deleted
inserted
replaced
7096:81bed50b9feb | 7097:e8c94e473c68 |
---|---|
2730 @deftypefn {Built-in Function} {} rats (@var{x}, @var{len})\n\ | 2730 @deftypefn {Built-in Function} {} rats (@var{x}, @var{len})\n\ |
2731 Convert @var{x} into a rational approximation represented as a string.\n\ | 2731 Convert @var{x} into a rational approximation represented as a string.\n\ |
2732 You can convert the string back into a matrix as follows:\n\ | 2732 You can convert the string back into a matrix as follows:\n\ |
2733 \n\ | 2733 \n\ |
2734 @example\n\ | 2734 @example\n\ |
2735 eval(['[',rats(hilb(4)),'];'])\n\ | 2735 r = rats(hilb(4));\n\ |
2736 x = str2num(r)\n\ | |
2736 @end example\n\ | 2737 @end example\n\ |
2737 \n\ | 2738 \n\ |
2738 The optional second argument defines the maximum length of the string\n\ | 2739 The optional second argument defines the maximum length of the string\n\ |
2739 representing the elements of @var{x}. By default @var{len} is 9.\n\ | 2740 representing the elements of @var{x}. By default @var{len} is 9.\n\ |
2740 @seealso{format, rat}\n\ | 2741 @seealso{format, rat}\n\ |
3125 \n\ | 3126 \n\ |
3126 @example\n\ | 3127 @example\n\ |
3127 @group\n\ | 3128 @group\n\ |
3128 ans =\n\ | 3129 ans =\n\ |
3129 \n\ | 3130 \n\ |
3130 3.1416\n\ | |
3131 9.8696\n\ | 3131 9.8696\n\ |
3132 97.409\n\ | 3132 97.409\n\ |
3133 9488.5\n\ | 3133 9488.5\n\ |
3134 9.0032e+07\n\ | 3134 9.0032e+07\n\ |
3135 8.1058e+15\n\ | 3135 8.1058e+15\n\ |
3144 \n\ | 3144 \n\ |
3145 @example\n\ | 3145 @example\n\ |
3146 @group\n\ | 3146 @group\n\ |
3147 ans =\n\ | 3147 ans =\n\ |
3148 \n\ | 3148 \n\ |
3149 3.1416\n\ | |
3150 9.8696\n\ | 3149 9.8696\n\ |
3151 97.409\n\ | 3150 97.409\n\ |
3152 9488.5\n\ | 3151 9488.5\n\ |
3153 9.0032E+07\n\ | 3152 9.0032E+07\n\ |
3154 8.1058E+15\n\ | 3153 8.1058E+15\n\ |