Continuous Time Fourier Transform of a signal matrix
古いコメントを表示
I have a matrix of 100 rows and 2 columns. Column 1 consists of time signal at frequency 50Hz (0.02 0.04 0.06...) column 2 is signal whose fft is to be determined. I would like to have a function that determines the Fourier transform of the signal at the frequency determined by the 1st column of the matrix.
採用された回答
その他の回答 (3 件)
Wayne King
2012 年 7 月 28 日
編集済み: Wayne King
2012 年 7 月 28 日
You stated in your original post that your matrix had an even number of elements, 100x2. In fact your matrix is 9079x2. You data also has a mean which is nonzero so that will make the 0 frequency component very large, it's better to remove the mean first.
x = data(:,2);
x = detrend(x,0);
len = length(x)
t = 0:0.02:(len*0.02)-0.02;
xdft = fft(x);
xdft = xdft(1:(length(xdft)+1)/2);
freq = 0:50/len:25;
plot(freq,abs(xdft))
xlabel('Hz'); ylabel('Magnitude')
1 件のコメント
Anubhav Rohatgi
2012 年 7 月 28 日
編集済み: Anubhav Rohatgi
2012 年 7 月 28 日
Juhi Maraskole
2020 年 9 月 16 日
0 投票
x(t) = e-AT
カテゴリ
ヘルプ センター および File Exchange で Fast Fourier Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!