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
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
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 CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by