fabien van mook

all packages "fvm-*"

package "fvm-real2eng"

function file "real2str_old.m"

Function o = real2str(r,m,g,k)
         o = real2str(r,m,g,k,outputarray)

returns a string representation of real r (with
m-th power of ten and g significant digits). The
string representation contains a sign (only when
r is negative), a fractional part (with a decimal 
dot) and the k-th power of ten. The result can
be expressed with the following pattern:
  [-]d[.d[d*]]e[-]d[d*]
where "d" indicates a single digit, brackets a
possible expansion, "*" zero or more times the 
type of the previous token, "-" the negative sign,
and "." the decimal dot, and "e" the letter e 
after which the integer k is printed.

If r, m, g and k are matrices with more than one
elements (all of the same size), output o will be
a cell array of the same size. Output o will 
always be a cell array, if the optional input 
argument outputarray is 1.

A real may have a non-finite value, it will be 
displayed as "NA", "NaN", "Inf" or "-Inf".


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-real2eng" under GNU GPLv3+