Is the really a correct way to check if a filter is an FIR filter?

1 次查看(过去 30 天)
I found the following function in Matlab. It checks if a filter is has FIR. It basically checks that there is only one non-zero output term at at the first index. Is it really general? It is possible to design FIR filters with more than one non-zero output term.
function isfirflag = isfirisfir(b,a)
%ISFIR(B,A) True if FIR.
if nargin<2, a=[]; end
if isempty(a), a=1; end
if ~isvector(b) || ~isvector(a)
error(message('signal:signalpolyutils:InvalidDimensions'));
end
if find(a ~= 0, 1, 'last') > 1,
isfirflag = 0;
else
isfirflag = 1;
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Filter Analysis 的更多信息

产品


版本

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by