Hello,
I have a large CSV file with 1 collum of data. This data contains million entries.
Now i want to use the FFT on this data.(Time,G)
with FFT i want to know it's frequency-G graph.
sampling interval is 1.00E-05

4 件のコメント

Adam Danz
Adam Danz 2018 年 7 月 11 日
Sounds clear cut; what's the problem you're having? Loading the CSV data into matlab?
CHANSIK JOO
CHANSIK JOO 2018 年 7 月 11 日
No i already Loaded the file .. the problem is that i want to FFT through this data Sheet and get graph into Frequency And G (which both has equally million entries) A22-A100022 and C22-C100022
Adam Danz
Adam Danz 2018 年 7 月 11 日
編集済み: Adam Danz 2018 年 7 月 11 日
The 2nd half of this powerpoint provides examples of how to plot FFT results in the frequency domain in matlab.
Mathworks also includes a chapter on frequency domain analysis.
Lastly, the responses to this question might be helpful.
dpb
dpb 2018 年 7 月 11 日
Why use Excel at all?
What is a "frequency-G graph"?
How to do PSD from FFT is illustrated in example in
doc FFT
and an extensive discussion on how to normalize with further examples in recent Q? here. See Answer_327291 and the earlier referenced there.

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2018 年 7 月 11 日

0 投票

You have several NaN values in your data the prevent the fft calculation. Remove them, and the fft works:
[D,S,R] = xlsread('tek0006CH1.csv');
Ts = 1E-5;
Fs = 1/Ts;
Fn = Fs/2;
L = size(D,1);
tv = linspace(0, L, L)*Ts;
AC = D(:,[2 3]);
figure(1)
plot(tv, AC)
grid
nanrows = any(isnan(AC),2); % Rows With ‘any’ NaN
nannr = nnz(nanrows); % Number Of Rows With ‘any’ NaN
AC_edt = AC(~nanrows,:); % Delete All Rows With ‘any’ NaN
L_edt = size(AC_edt,1); % Corresponding Length
AC_edt_mean = mean(AC_edt); % Mean (D-C Offset)
FT_AC = fft(AC_edt - AC_edt_mean)/L_edt; % Fourier Transform Of Mean-Corrected Values
Fv = linspace(0, 1, fix(L_edt/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure(2)
plot(Fv, abs(FT_AC(Iv,:))*2)
grid
xlim([0 1000]);
Experiment to get the r4esults you want.

カテゴリ

ヘルプ センター および File Exchange で Fourier Analysis and Filtering についてさらに検索

質問済み:

2018 年 7 月 11 日

回答済み:

2018 年 7 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by