Can anybody help me with the following code?

조회 수: 1 (최근 30일)
Darsana P M
Darsana P M 2017년 3월 16일
댓글: Darsana P M 2017년 3월 17일
[z,fs]=audioread('bird1.mp3');
bfil=fft(z); %fft of input signal
wn=[4000 8000]/(fs/2); %bandpass
[b,a]=butter(6,wn);
fvtool(b,a);
I was able to draw the graph for this particular range. Can i draw wn=[8000 12000]/(fs/2); n the same graph itself, instead of another figure???

채택된 답변

GEEVARGHESE TITUS
GEEVARGHESE TITUS 2017년 3월 16일
I not sure of obtaining multiple plots in the same window using fvtool. Instead you can get what you required, using functions freqz(), plot() and hold on.
[z,fs]=audioread('bird1.mp3');
bfil=fft(z); %fft of input signal
wn=[4000 8000]/(fs/2); %bandpass
[b,a]=butter(6,wn);
[h,w]=freqz(b,a);
plot(w/pi,20*log10(abs(h)),'r');
hold on;
wn=[8000 12000]/(fs/2);
[b,a]=butter(6,wn);
[h,w]=freqz(b,a);
plot(w/pi,20*log10(abs(h)),'b');
  댓글 수: 3
GEEVARGHESE TITUS
GEEVARGHESE TITUS 2017년 3월 17일
Sorry , i was not able to understand your question? Elaborate please. Are you thinking of bank of butterworth filers?
Darsana P M
Darsana P M 2017년 3월 17일
yaa exactlty. How can i write a code for a bank of butterworth filters? Such that i can divide the given audio signal into different bands ie 10-20Khz, 20-30Khz and so on.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by