Storing the peak values of a fft
6 次查看(过去 30 天)
显示 更早的评论
I have produced a code that will analyse vibration data. What I want to do is record the peak values of the FFT and store them so I can produce a graph showing the peak values of various runs of vibration data.
1 个评论
Adam
2018-2-12
What is your problem in doing this? Isn't it just
max( abs( y ) )
where y is your fft result for a given input?
回答(1 个)
Matt
2018-2-12
Hi Gavin
You can find local maxima by using the "findpeaks" function in MATLAB. Below is an example:
x = linspace(0,8*pi);
y = sin(x)./x;
[m,idx] = findpeaks(y);
plot(x,y)
hold on
plot(x(idx),y(idx),'ro')
hold off
You could apply this function to your fft output to find peaks.
Matt
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!