How to plot WAV file
27 次查看(过去 30 天)
显示 更早的评论
Hello,
I'd like to plot .wav file in time and frequency domain.
0 个评论
采纳的回答
Wayne King
2011-11-23
If this is the output of wavread, then see if you have two channels in y
[y,fs] = wavread(filename);
If y is two-channels, Nx2, then just plot one:
y = y(:,1);
dt = 1/fs;
t = 0:dt:(length(y)*dt)-dt;
plot(t,y); xlabel('Seconds'); ylabel('Amplitude');
figure
plot(psd(spectrum.periodogram,y,'Fs',fs,'NFFT',length(y)));
10 个评论
Anzzza
2022-2-9
when you have stereo audio, you got two channels. if you can, it's easier to work with one
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Pulsed Waveforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!