Effacer les filtres
Effacer les filtres

Matlab Audio FFT at given times

2 vues (au cours des 30 derniers jours)
Hans Buchele
Hans Buchele le 26 Jan 2022
Modifié(e) : Hans Buchele le 28 Jan 2022
Dear Matlab-Community,
I need to be able to load an audio file, compute an FFT at a given time and extract frequency and peak amplitude in a certain frequency band.
[y1,fs]=audioread('Audio 12.wav')
t=linspace(0,length(y1)/fs,length(y1));
Nfft=2048;
f=linspace(0,fs,Nfft);
X1=abs(fft(y1,Nfft));
plot(f(1:Nfft/2),X1(1:Nfft/2))
xlabel('Frequency');
ylabel ('Power');
title ('FFT Spectrum');
Thanks for any help!

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by