How to identify a tone within 0.25 Hz of several sinusoidal tones?
3 次查看(过去 30 天)
显示 更早的评论
S = load('Student_7.dat');
a = S(:,1);
b = S(:,2);
[h,w] = freqz(b,a,1,.25)
--received a file containing 10 seconds of sampled data, which is file.
I don't think this code is correct, Please help.
5 个评论
Walter Roberson
2019-4-22
Not fft: you want to use the Non-Uniform FFT from the File Exchange, unless the samples are strictly equal time interval.
Star Strider
2019-4-22
If they are not uniformly sampled, use the resample (link) function to resample them to uniform sampling intervals created with the linspace (link) function. Then do the fft on the resampled signal
It is easy to determine if they are uniformly sampled. If they are, this calculation:
dt_sd = std(diff(S(:,1)))
should be close to eps, on the order of 1E-15.
回答(0 个)
另请参阅
类别
在 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!