clear all;





% Note that N, the "order" is the length of the impulse response


N = 100;


b = fir1(N,[0.1 0.3]);





Nf = 100;


f = linspace(-1/2,1/2,Nf);


B = zeros(1,Nf);


for i = 1:Nf


    for k = 1:N+1


        B(i) = B(i) + b(k)*exp(-j*k*2*pi*f(i));


    end


end


plot(f,abs(B));





% freqz(b);