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.


Most recent fixed-point filtering operation report


rlog = qreport(h)


rlog = qreport(h) returns the logging report stored in the filter object h in the object rlog. The ability to log features of the filtering operation is integrated in the fixed-point filter object and the filter method.

Each time you filter a signal with h, new log data overwrites the results in the filter from the previous filtering operation. To save the log from a filtering simulation, change the name of the output argument for the operation before subsequent filtering runs.

    Note   qreport requires Fixed-Point Designer™ software and that filter h is a fixed-point filter. Data logging for fi operations is a preference you set for each MATLAB session. To learn more about logging, LoggingMode, and fi object preferences, refer to fipref in the Fixed-Point Designer documentation.

    Also, you cannot use qreport to log the filtering operations from a fixed-point Farrow filter.

Enable logging during filtering by setting LoggingMode to on for fi objects for your MATLAB session. Trigger logging by setting the Arithmetic property for h to fixed, making h a fixed-point filter and filtering an input signal.

Using Fixed-Point Filtering Logging

Filter operation logging with qreport requires some preparation in MATLAB. Complete these steps before you use qreport.

  1. Set the fixed-point object preference for LoggingMode to on for your MATLAB session. This setting enables data logging.

  2. Create your fixed-point filter.

  3. Filter a signal with the filter.

  4. Use qreport to return the filtering information stored in the filter object.

qreport provides a way to instrument your fixed-point filters and the resulting data log offers insight into how the filter responds to a particular input data signal.

Report object rlog contains a filter-structure-specific list of internal signals for the filter. Each signal contains

  • Minimum and maximum values that were recorded during the last simulation. Minimum and maximum values correspond to values before quantization.

  • Representable numerical range of the word length and fraction length format

  • Number of overflows during filtering for that signal.


collapse all

This example shows how to use qreport to log the results of filtering a sinusoidal signal with a fixed-point direct-form FIR filter, firFilt. To use the qreport, set the LoggingMode of fixed-point objects to 'on'.

hd = design(fdesign.lowpass,'equiripple');
hd.arithmetic = 'fixed';
hd.InputWordLength = 32;
fs = 1000;          % Input sampling frequency.
t = 0:1/fs:1.5;     % Signal length = 1501 samples.
x = sin(2*pi*10*t); % Amplitude = 1 sinusoid.
y = filter(hd,x);
rlog = qreport(hd)
rlog =

                                                  Fixed-Point Report                                          
                      Min              Max       |              Range              |      Number of Overflows
         Input:              -1                1 |         -65536            65536 |              0/1501 (0%)
        Output:        -1.02325          1.02325 |        -131072           131072 |              0/1501 (0%)
       Product:     -0.48538208       0.48538208 |         -32768            32768 |             0/64543 (0%)
   Accumulator:      -1.0852075        1.0852075 |        -131072           131072 |             0/63042 (0%)

See Also


Introduced in R2011a

Was this topic helpful?