FINDING FREQUENCY AND AMPLITUDE OF A SINUSOID FROM DATA POINTS.

조회 수: 64 (최근 30일)
ARAVINDHAN RAMESH
ARAVINDHAN RAMESH 2014년 5월 27일
댓글: rifat 2014년 5월 27일
Hello,
I have a text file with two columns: One with the time instant and the other with the corresponding velocity of a sound wave at a particular point at that instant. I know that the wave is a sinusoid (After plotting).
How can I find the exact frequency and amplitude of the wave? Is there a function in MATLAB?
Thanks in advance.

답변 (1개)

rifat
rifat 2014년 5월 27일
len=length(signal);
fs=50 % assuming you know the sampling frequency of your signal
n=0:len-1;
N=n*fs/(len-1); % convert x-axis in actual frequency
y=fft(signal);
plot(N,abs(y));
from the plot you can determine the frequency peak. I do not know any function for amplitude estimation. If the signal relatively low noisy, then (max(signal)-min(signal))/2 should give a rough estimate
  댓글 수: 2
ARAVINDHAN RAMESH
ARAVINDHAN RAMESH 2014년 5월 27일
편집: ARAVINDHAN RAMESH 2014년 5월 27일
Is signal the vector containing the values of velocity of the wave at each time instant?
If yes, then how is len different from fs? fs is left for us to choose? (I do not not know the sampling frequency!)
rifat
rifat 2014년 5월 27일
yes.. it is velocity.. fs is sampling frequency..

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

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by