function output = mnzpk( Z, P, K ) % mnzpk : modified of MATLAB zpk function. % Input arguments: % Z: list of zeros[Hz] % P: list of poles[Hz] % K: the DC gain. If there are pole or zero at 0, the gain at 1Hz if mnismember([Z P],0) output = zpk(Z*2*pi, P*2*pi, abs(prod(P*2*pi+1i*2*pi)/prod(Z*2*pi+1i*2*pi))*K); else output = zpk(Z*2*pi, P*2*pi, prod(P*2*pi)/prod(Z*2*pi)*K); end end