Log minimums
y = minlog(a)
y = minlog(q)
y = minlog(a)
returns the smallest real-world
value of fi
object a
since logging
was turned on or since the last time the log was reset for the object.
Turn on logging by setting the fipref
object LoggingMode
property
to on
. Reset logging for a fi
object
using the resetlog
function.
y = minlog(q)
is the minimum value after
quantization during a call to quantize(q,...)
for quantizer
object q
.
This value is the minimum value encountered over successive calls
to quantize
since logging was turned on, and is
reset with resetlog(q)
. minlog(q)
is
equivalent to get(q,'minlog')
and q.minlog
.
P = fipref('LoggingMode','on'); a = fi([-1.5 eps 0.5], true, 16, 15); a(1) = 3.0; minlog(a) ans = -1
The smallest value minlog
can return is the
minimum representable value of its input. In this example, a
is
a signed fi
object with word length 16
,
fraction length 15
and range:
-1 ≤ x ≤ 1 – 2-15
fi
object a
using
the range
function:format long g r = range(a) r = -1 0.999969482421875
q = quantizer;
warning on
x = [-20:10];
y = quantize(q,x);
minlog(q)
Warning: 29 overflows.
> In embedded.quantizer.quantize at 74
ans =
-1
The smallest value minlog
can return is the
minimum representable value of its input. You can obtain the range
of x
after quantization using the range
function:
format long g r = range(q) r = -1 0.999969482421875
fipref
| maxlog
| noverflows
| nunderflows
| reset
| resetlog