[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## "format short f"

**From**: |
John W. Eaton |

**Subject**: |
"format short f" |

**Date**: |
Fri, 4 Aug 2000 10:09:08 -0500 (CDT) |

On 4-Aug-2000, Dirk Laurie <address@hidden> wrote:
| I know that Matlab is like that too, but I find the insistence on
| significant figures at all times annoying.
See if setting fixed_point_format = 1 does what you want. It should
make the output behave in a more Matlab-like way. For example
octave:6> [1e6, 1e-6; 1e-6, 1e6]
ans =
1.0e+06 *
1.00000 0.00000
0.00000 1.00000
octave:7> hilb(5) * invhilb(5)
ans =
1.00000 0.00000 -0.00000 0.00000 -0.00000
-0.00000 1.00000 -0.00000 0.00000 -0.00000
0.00000 -0.00000 1.00000 -0.00000 0.00000
-0.00000 0.00000 -0.00000 1.00000 0.00000
-0.00000 0.00000 -0.00000 0.00000 1.00000
The reason it is not the default is that it can cause you to think
numbers are zero when they are really just several orders of magnitude
smaller that the largest values in the matrix. I also think it is
easy to miss the scale factor.
jwe
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------