Borrar filtros
Borrar filtros

How to compute the Sampling frequency from Time Stamps

10 visualizaciones (últimos 30 días)
Lisa Justin
Lisa Justin el 15 de Ag. de 2013
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?

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 15 de Ag. de 2013
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 comentarios
Lisa Justin
Lisa Justin el 15 de Ag. de 2013
This gives an array of numbers. the sampling frequency i expect should be fixed
Jan
Jan el 15 de Ag. de 2013
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 )

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by