close all;
clc;
clearvars;
b=log10(8000);
BW = 100;
yc1=logspace(2,b,23);
yd=stem(yc1);
grid on
xlabel('Borders','FontSize',12);
ylabel('F (Hz)','FontSize',12);
set(gca,'YScale', 'log')
fs=21e3
for i= 1:1:23
BW = 100;
BW = yc1(i)/5;
f_low = yc1(i) - BW/2;
f_high = yc1(i) + BW/2;
[B,A] = butter(1,[f_low, f_high]*2/fs,'bandpass');
freq = logspace(log10(f_low/4),log10(f_high*4),100),
[h]=freqz(B,A,freq,fs);
figure(2)
hold on
semilogx(freq,20*log10(abs(h)));
end
hold off
grid
set(gca,'XLim',[0 1e4],'XTick',10.^(0:4),'YLim',[-12 0],'YTick',-12:2:0,'XScale', 'log')
0 Comments
Sign in to comment.