how to get only the important bandwidth of a sound

조회 수: 2 (최근 30일)
andreas ioannou
andreas ioannou 2017년 2월 7일
댓글: andreas ioannou 2017년 2월 7일
Hello i am doing sound processing and i get all the time the [upper,~] = bandwidth(y); upper is around 220k either i speak or not when i use Amplitude Spectrum with out speaking i get this figure
my code for the plot is
set(0,'DefaultFigureVisible','on')
Y = fft(y);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
h(4)=figure;
plot(f,P1)
title('Single-Sided Amplitude Spectrum of X(t)');
xlabel('f (Hz)')
ylabel('|P1(f)|')
=f;
yyyyy=P1;
indexmax = find(max(yyyyy) == yyyyy);
xmax = xxxxx(indexmax);
ymax = yyyyy(indexmax);
strmax = ['Maximum = ',num2str(ymax),' F = ',num2str(xmax),' hz'];
text(xmax,ymax,strmax,'HorizontalAlignment','left');
i need to get only the important freq and if i speak to get near the 300-3000 of a human bandwidth or if i have a dog sound to get the dog bandwidth
Thanks
  댓글 수: 5
Jan
Jan 2017년 2월 7일
As Walter has assumed already: This is the linear algebra bandwidth of the array, which means the number of non-zero elements below or over the main diagonal: https://www.mathworks.com/help/matlab/ref/bandwidth.html
andreas ioannou
andreas ioannou 2017년 2월 7일
thanks jan, do u know any way to cut these freq in the pic? lets say to cut the freq below 0.01 of the P1

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

채택된 답변

Honglei Chen
Honglei Chen 2017년 2월 7일
편집: Honglei Chen 2017년 2월 7일
  댓글 수: 3
Honglei Chen
Honglei Chen 2017년 2월 7일
The reference page now actually indicates, at the bottom of the page, which release the function is introduced. I think both of them are introduced in R2015a, so you probably need to upgrade.
andreas ioannou
andreas ioannou 2017년 2월 7일
ok thanks Honglei Chen :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by