Confirming Correct Results and Y-Axis of FFT

17 ビュー (過去 30 日間)
Mitchell Berthelot
Mitchell Berthelot 2020 年 6 月 18 日
回答済み: Ajith Krishna Kanduri 2020 年 6 月 19 日
I am taking the FFT of some data and have two questions: how do I know I am correct and what are the units of my y-axis?
Let us start with question two. Here is my original time domain signal:
From what I have read the y-axis units of your FFT should be the same as your units on your time-domain signal which in my case is millimeters. Now when I take the FFT my results are as follows:
When I look at this data I am puzzled as nothing that I am doing is every 35mm. I know that my frequencies are very small, but that is expected with my appliaciotn. Here is the code that I am using to make this signal:
s = data - mean(data); %Removes DC component
len2 = 2^nextpow2(len); %Changes lentgh of signal
s = fft(s,len2);
s2 = s(1:len2/2);
xfft = Fs*(0:len2/2-1)/len2; %Converts x-axis to Hz
plot(xfft,abs(s2));
I wanted to add that even though I removed the DC compoent I still have a large spize at very close to 0Hz. Is that normal? Now back to my first question, how do I know this is correct? Any insight would be helpful.

採用された回答

Ajith Krishna Kanduri
Ajith Krishna Kanduri 2020 年 6 月 19 日
Hi,
The results of the absolute value of the output of the fft function (that you have correctly calculated and scaled) are in the same units as the original data vector. If you measured your data in millimeters, the y-axis of the fft output in your code will be in millimeters.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by