This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Determine whether filter uses real coefficients




isreal(hd) returns 1 (or true) if all filter coefficients for the filter hd are real, and returns 0 (or false) otherwise. Complex filters have one or more coefficients with nonzero imaginary parts.

isreal(hs) determines whether the filter coefficients of the filter System object™ hs are real, returning 1 if true and 0 if false.


Quantizing a filter cannot make a real filter into a complex filter.


collapse all

Create a dsp.BiquadFilter System object™. Pass a fixed-point input to the object. Test the coefficients of the fixed-point filter to see if they are strictly real.

d = fdesign.lowpass('n,fp,ap,ast',5,0.4,0.5,20);
biquadFilter = design(d,'ellip','SystemObject',true);
IsRealBefore = isreal(biquadFilter)
IsRealBefore = logical

Pass a fixed-point input to the object.

fiInput = fi(randn(1000,2),1,32,16);
fiOutput = biquadFilter(fiInput);
IsRealAfter = isreal(biquadFilter)
IsRealAfter = logical

isreal returns a 1, indicating that the filter coefficients are real.

Introduced in R2011a