| Filter Design Toolbox | ![]() |
Filtering Data with Quantized Filters
You can filter data with quantized filters using the filter function.
Example: Filtering Data with a Quantized Filter
warning on randn('state',0);x = randn(100,2);[b,a] = butter(3,.9,'high');Hq = sos(qfilt('ReferenceCoefficients',{0.5* b,0.5*a},... 'CoefficientFormat',unitquantizer([26 24])));y = filter(Hq,x); Warning: 64 overflows in QFILT/FILTER. Max Min NOverflows NUnderflows NOperations Coefficient 1.187 -1 0 0 12 1.648 -2 0 0 18 Input 2.183 -2.202 64 0 200 Output 0.4345 -0.4477 0 0 200 Multiplicand 1 -1 0 2 800 0.4345 -0.4477 0 0 1000 Product 0.009246 -0.008869 0 0 800 0.7158 -0.7377 0 0 1000 Sum 0.01274 -0.0122 0 0 600 0.4345 -0.4477 0 0 1000
Notice that a record of the overflows that occurred in filtering is displayed if you have set warning on.
Use qreport to get this listing when needed as well.
| Specifying the Data Formats | Transformation Functions for Quantized Filter Coefficients | ![]() |