バタワースフィルタのインパルス応答

clear; close all;

s =  tf('s');
Ns = 1:8;

for idx = 1:length(Ns)

    n = Ns(idx);
    D = 1;
    for jdx=1:n
        j = jdx;
        sigma_j = -sin((2*j-1)/(2*n)*pi);
        omega_j = cos((2*j-1)/(2*n)*pi);
        sj = sigma_j + i*omega_j;
        D = D*(s-sj);
    end
    H = 1/D;
    subplot(4,2,n);
    impulse(H);
    coef(D)
end

big;

function n = coef(D)
[n,d] = tfdata(D);
n = cell2mat(n);
n = n(2:end);
n = real(n);
end