フィルターのクリア

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

1 回表示 (過去 30 日間)
Fam
Fam 2014 年 1 月 24 日
コメント済み: Iain 2014 年 1 月 29 日
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 Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by