필터 지우기
필터 지우기

How Do I Use Fft Function In Matlab To Find The Frequency For A Set Of Data Points?

조회 수: 1 (최근 30일)
hi ive been given a set of about 20k data points. i managed to import the data into matlab and did the following,
importdata; fft(importdata);
and it says Undefined function 'fft' for input arguments of type 'cell'. now i understand i need more than this to get it working, can someone please tell me any more parameters i need for the fft and how to implement it?
edit: these datapoints are timestamps of when something is detected in a machine, im trying to find if there is a period of the detection occuring.
anyone have ideas how to trasnform it so i can use matlab fft? Imp

채택된 답변

Iain
Iain 2014년 1월 24일
If what you have is the times of occurrences, then a fft is inappropriate. - FFTs require regularly sampled data.
I don't know what your "importdata" looks like. You'll need to provide a description.
If what your data looks like is something like a table of
timestamp: event
timestamp: event
Then you can simply calculate the difference between each time stamp. If you then plot the difference in timestamp, you'll probably see several clusters of values. Each cluster is likely to be the period of a regular event - or a multiple of it.
  댓글 수: 4
Fam
Fam 2014년 1월 24일
hi Iain,
i entered that code but nothing happened,pardon me for asking, what does the function diff(importdata{1}) do and what does 'x' refer to?
Thanks alot
Iain
Iain 2014년 1월 29일
importdata{1}, is where I've assumed that a vector of those time stamps is. - I can't see your data so I don't know if it's right.
diff( vector ) simply subtracts the 2nd element from the 1st, the 3rd from the 2nd, etc. and returns a vector of those differences.
plot( vector, 'x') plots each value in the vector, with crosses instead of as a line.

댓글을 달려면 로그인하십시오.

추가 답변 (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