필터 지우기
필터 지우기

Is this code is good for audio frequency response in mili seconds?

조회 수: 1 (최근 30일)
Yasir Ali
Yasir Ali 2019년 3월 26일
댓글: Jan 2019년 4월 4일
t=0:0.001:2; % 2 secs @ 1kHz sample rate x=chirp(t,0,1,150); % Start @ DC, cross 150Hz at t=1sec F = 0:.1:100; [y,f,t,p] = spectrogram(x,256,250,F,1E3,'yaxis'); % NOTE: This is the same as calling SPECTROGRAM with no outputs. surf(t,f,10*log10(abs(p)),'EdgeColor','none'); axis xy; axis tight; colormap(jet); view(0,90); xlabel('Time'); ylabel('Frequency (Hz)'); [y,fs]=audioread('Mithe Mustafa Tey 5sec.mp3'); NW = round(fs*0.250); [S,F,T,P] = spectrogram(y(1:,NW,[],[],fs); subplot (2,1,1),pcolor(T,F,log10(p)), shading flat, caxis([-6 0] +max(caxis)) colorbar subplot (2,1,2) semilogy(F,P(:,23)) titlw(sprintf('PSD at time: %f',T(23))) xlabel ('Frequency(HZ)')
  댓글 수: 1
Jan
Jan 2019년 4월 4일
Please format your code properly, such that it is readable. Don't you see that it cannot be understood in this messy format and that otehr questions contain nicely formatted code?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by