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
Best Answer