필터 지우기
필터 지우기

How to compute the Sampling frequency from Time Stamps

조회 수: 11 (최근 30일)
Lisa Justin
Lisa Justin 2013년 8월 15일
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?

답변 (1개)

Azzi Abdelmalek
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
Lisa Justin
Lisa Justin 2013년 8월 15일
This gives an array of numbers. the sampling frequency i expect should be fixed
Jan
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 CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by