Navigation

Operators and Keywords

Function List:

C++ API

: val = fixed_point_format ()
: old_val = fixed_point_format (new_val)
: fixed_point_format (new_val, "local")

Query or set the internal variable that controls whether Octave will use a scaled format to print matrix values.

The scaled format prints a scaling factor on the first line of output chosen such that the largest matrix element can be written with a single leading digit. For example:

logspace (1, 7, 5)'
ans =

 1.0e+07  *

 0.00000
 0.00003
 0.00100
 0.03162
 1.00000

Notice that the first value appears to be 0 when it is actually 1. Because of the possibility for confusion you should be careful about enabling fixed_point_format.

When called from inside a function with the "local" option, the variable is changed locally for the function and any subroutines it calls. The original variable value is restored when exiting the function.

See also: format, output_max_field_width, output_precision.

Package: octave