Frequency domain analysis of a Audio signal

hi Matlab experts,
I am relatively new to Matlab.
I have an Audio sample of an electric motor running noise. The Audio file is 25 Sec long, it has got 551251 samples. I did following FFT analysis on the signal.
if true
% code start
y = wavread('audio_signal');
N = lendth (y);
Fs = N / 25;
f = (Fs/N).*(0:N-1);
Y = fft(y,N);
Y = abs (Y(1:N)./(N/2));
Y(Y==0) = eps;
Y = 20log10(Y);
plot (f,Y);
grid on
% code end
on running this code it has created attached figure.
Now I don't understand what kind of information can I extract from this figure. I basically want peak frequency components, various noise information and power information.
Please help me to understand this figure.
thanks in Advance,
Harry

답변 (1개)

Veera Kanmani
Veera Kanmani 2018년 2월 28일

2 개 추천

[audio_in,audio_freq_sampl]=audioread('audio_signal');
Length_audio=length(audio_in);
df=audio_freq_sampl/Length_audio;
frequency_audio=-audio_freq_sampl/2:df:audio_freq_sampl/2-df;
figure
FFT_audio_in=fftshift(fft(audio_in))/length(fft(audio_in));
plot(frequency_audio,abs(FFT_audio_in));
title('FFT of Input Audio');
xlabel('Frequency(Hz)');
ylabel('Amplitude');

댓글 수: 7

thank you,its of great use
is there any inbuilt function to find out the value of peaks in the graph? findpeaks not working in this ..
you can try 'max' function
Do you know how to get the dominant frequency from the audio file?
Vikas Ingle
Vikas Ingle 2019년 2월 17일
Why hold function is not working on this code?
Paryul Jain
Paryul Jain 2019년 2월 20일
How to get the dominant frequencies , so that they can be further used in the code?
MANTHAN Rana
MANTHAN Rana 2020년 6월 18일
What is the unit of 'Amplitude' in label y?

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

카테고리

도움말 센터File Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

질문:

2016년 4월 27일

댓글:

2020년 6월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by