MATLAB Answers

## How can determine the sampling frequency from a time series data?

Asked by Lisa Justin

### Lisa Justin (view profile)

on 21 Aug 2012
Accepted Answer by Star Strider

### Star Strider (view profile)

i need the sampling frequenccy of a give time series data. it is a 1x31225 time data if i choose any two point say x(:,1) and x(:,2)

1/x(:,2)-x(:,1) does not give a likely sampling frequency, it gives about 0.2144 for instance. please help out

## Products

No products are associated with this question.

## 2 Answers

### Star Strider (view profile)

Answer by Star Strider

### Star Strider (view profile)

on 21 Aug 2012
Edited by Star Strider

### Star Strider (view profile)

on 21 Aug 2012
Accepted answer

All may not be lost. When I searched for information on .sif files, I came up with a number of different definitions, including Andor Scan Information File (there are at least two TMW File Exchange entries for those), and Cytoscape Simple Interaction Format. (They are also Windows Setup Information Files, but those likely aren't the ones you are interested in.)

What generated your .sif file, and what does it contain? How many rows and columns should it have? If it is supposed to be a matrix rather than a vector, it may be possible to get the time data (if there is a time vector in the matrix) by doing reshape on it.

### Azzi Abdelmalek (view profile)

Answer by Azzi Abdelmalek

### Azzi Abdelmalek (view profile)

on 21 Aug 2012

` if x(:,1) is time and x(:,2) is your signal`

then, if the sample frequency is constante

` f=1/((x(2,1)-x(1,1))`

Lisa Justin

### Lisa Justin (view profile)

on 21 Aug 2012
` no vector time given. `
Lisa Justin

### Lisa Justin (view profile)

on 21 Aug 2012

i guess it was lost from conversion from a SIF file. but i have only the converted file, any ideas

Azzi Abdelmalek

### Azzi Abdelmalek (view profile)

on 19 Oct 2012

Without a vector time, we can't find your sample frequency. I can't guess what happens to your file.

#### Join the 15-year community celebration.

Play games and win prizes!

Learn more

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

### MATLAB Academy

New to MATLAB?

Learn MATLAB today!