Determine whether filter has linear phase
flag = islinphase(b,a)
flag = islinphase(sos)
flag = islinphase(h)
flag = islinphase(...,tol)
flag = islinphase(hs,...)
flag = islinphase(hs,'Arithmetic',arithtype)
flag = islinphase(b,a) returns a logical output, flag, equal to true if the filter coefficients in b and a define a linear phase filter. flag is equal to false if the filter does not have linear phase.
flag = islinphase(sos) returns true if the filter specified by second order sections matrix, sos, is linear phase. sos is a K-by-6 matrix, where the number of sections, K, must be greater than or equal to 2. Each row of sos corresponds to the coefficients of a second order (biquad) filter. The i-th row of the sos matrix corresponds to [bi(1) bi(2) bi(3) ai(1) ai(2) ai(3)].
flag = islinphase(h) determines if the filter object h is linear phase. islinphase accepts an adapfilt, dfilt, or mfilt object. To create an adapfilt or mfilt object, you must have the DSP System Toolbox™ software.
flag = islinphase(hs,'Arithmetic',arithtype) analyzes the filter System object hs based on the specified arithtype. arithtype can be one of 'double', 'single', or 'fixed'. When you specify 'double' or 'single', the function performs double- or single-precision analysis. When you specify 'fixed' , the arithmetic changes depending on the setting of the CoefficientDataType property and whether the System object is locked or unlocked. You must have the DSP System Toolbox to use islinphase with a System object.
When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic.
This FIR filter has linear phase.
d = fdesign.lowpass('n,fc',10,0.55); h = design(d,'window'); flag = islinphase(h)
Using the specification nb,na,fp,fst results in an IIR filter that is not linear phase in this design.
nb=15 na=10 d=fdesign.lowpass('nb,na,fp,fst',nb,na,0.45,0.55) h=design(d); flag = islinphase(h)