How to get the exact amplitudes of an irregular wave?
7 次查看(过去 30 天)
显示 更早的评论
I have time and displacement data of an irregular wave, and generated the amplitude spectrum by fft but the spectrum is very peaky it has lot of amplitudes (figure2). I need to extract the exact amplitude from that spectrum. For eg: given fig 1 has two peak amplitudes i need to get those amplitude at one time. If there was only one peak then it is easy to check by giving max command but for multiple peaks i dont know how to get that.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/346497/image.png)
After fft i got the below figure, how to i get the exact amplitude values from the below figure?. Is there is any other way to extract the amplitudes?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/346500/image.png)
The code i used for irregular sinwave to get the amplitude is,
T=time
X=Displacement
L = length(T);
nfft = 2^nextpow2(L);
f = Fs/2*linspace(0,1,nfft/2+1);
xfft = fft(X,nfft)/L;
xfftwant = 2*xfft(1:length(xfft)/2+1);
plot(f,abs(xfftwant ))
0 个评论
采纳的回答
Star Strider
2020-8-15
The second figure displays broadband noise. The easiest way to deal with that would be to denoise the original time-domain signal, either using the smoothdata function, the Wavelet Toolbox functions, or the Signal Processing Toolbox sgolayfilt function. The reason is that denoising the time-domain signal may be the easiest, since that allows interactive visual determination of the smoothed signal and the original signal. Then take the fft of the denoised signal to get the spectrum you want.
With broadband noise, frequency-selective filters will not work.
19 个评论
Star Strider
2020-8-27
I am not certain what you want to do. I would not change the fft call to produce fewer points, although that is an option using the optional second argument to the fft function. Depending on what you want, you can just trim the end of the ‘FTD2rs’ matrix, or decimate it, for example as:
FTD2rsd = FTD2rs(1:10:end,:);
to keep only every tenth value. Change the ‘step’ value (10 here) to produce different results and different row-length ‘FTD2rsd’ variables. There are other possibilities as well, such as interpolating it to a new frequency vector, using linspace to define the interopolation vector and interp1 to do the actual interpolation. The choice is yours.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Signal Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!