How to compute the Sampling frequency from Time Stamps
11 次查看(过去 30 天)
显示 更早的评论
Hi, I have the time stamps of a given signal xn, how can i compute the sampling frequency of this signal, it was not given?
0 个评论
回答(1 个)
Azzi Abdelmalek
2013-8-15
If t is the time stamps, then he sampling frequency is
fs=1./diff(t)
you can check if the he sampling frequency is fixed or variable
2 个评论
Jan
2013-8-15
If the sampling frequency is constant, all entries of the resulting array should be equal. If not, you could still calculate a 'mean sampling rate' with
fs = mean( 1./diff(t) )
To check if the sampling rate is constant you might do something like
is_const = all( diff( t, 2 ) == 0 )
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!