Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

minlog

Syntax

y = minlog(a)
y = minlog(q)

Description

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.

Examples

Example 1: Using minlog with fi objects

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

You can obtain the numerical range of any fi object a using the range function:

format long g
r = range(a) 

r =
 
                        -1         0.999969482421875

Example 2: Using minlog with quantizer objects

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

Introduced before R2006a

Was this topic helpful?