Download Filter Design Toolbox User`s Guide
Transcript
isreal
Purpose
11isreal
Test quantized filters for purely real coefficients
Syntax
r = isreal(hq)
Description
r = isreal(hq) returns the value 1 (equal to true) if all reference filter
coefficients for the quantized filter hq are real, and returns the value 0 (or false)
otherwise.
isreal(hq) returns 1 if all filter coefficients in quantized filter hq have zero
imaginary part. Otherwise, isreal(hq) returns a 0 indicating that the filter
is complex. That is, it detects complex filters, meaning quantized filters that
have one or more coefficients with nonzero imaginary parts.
Note Quantizing a filter cannot make a real filter into a complex filter.
Examples
% Create a reference filter.
[b,a] = ellip(2,0.5,20,0.4);
% Create a quantized filter from the reference filter.
hq = qfilt('df2t',{b,a});
% Test if all filter coefficients are real.
r = isreal(hq)
r =
1
11-81