https://jp​.mathworks​.com/help/​matlab/exa​mples/usin​g-fft.html

9 Ansichten (letzte 30 Tage)
FUJITA HIROYASU
FUJITA HIROYASU am 21 Mär. 2017
Kommentiert: Rik am 22 Mär. 2017
サンプルについての質問なんですが、
1.関数 fft を使用して、チューリッヒ データのフーリエ変換を行うときに、データの和が保存されている、出力の最初の要素を削除していますが、実際に他のデータでFFTをかける場合にも最初のデータには和が保存されているのでしょうか。    y = fft(relNums);    y(1) = [];
2.以下の文章とソースの関係で質問なんですが、
2.1 より意味のある係数の尺度は振幅の二乗です。これはべき乗の尺度です。 これは、以下に該当する認識ですが正しいでしょうか。   power = abs(y).^2
2.2 係数の半分は振幅内で繰り返されるため、係数の半分のべき乗を計算するだけで済みます。   これは、以下に該当する認識ですが正しいでしょうか。 n/2
2.3 以下がどこからどういった経緯で出てきたのか教えていただけないでしょうか。   maxfreq = 1/2; % maximum frequency
  2 Kommentare
Rik
Rik am 21 Mär. 2017
I would recommend that you translate your question to English. Google Translate doesn't work well enough so I can help you.
FUJITA HIROYASU
FUJITA HIROYASU am 22 Mär. 2017
Thank you for your reply.
My question as below. Using the fft function, take the Fourier transform of the Zurich data. Remove the first element of the output, which stores the sum of the data. Formula: y = fft(relNums); y(1) = [];
Although there is the above description. Q1 Is it also necessary to remove the first element when actually processing data?
Q2 Is the sum stored in the first element when applying FFT with other data?
A question in relation to the following sentences and sources.
Q3 A more meaningful measure of the coefficients is their magnitude squared, which is a measure of power. This sentence mean below formula. Is it correct?
power = abs(y).^2
Q4 Since half of the coefficients are repeated in magnitude, you only need to compute the power on one half of the coefficients. This sentence mean below formula. Is it correct? n/2 (Precondition : n=length(y))
Q5 Could you tell me where and how the following came out?   maxfreq = 1/2; % maximum frequency
Best Regards

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Rik
Rik am 22 Mär. 2017
I am not a signal processing expert, but here goes.
Regarding questions 1 and 2: The first element will contain information about the magnitude, as it is the 0 Hz component. This is true for all Fourier transformed data sets. If you have a relatively high mean value, your data may be easier to visually analyze if you remove the first value. Removing the first value should be more or less equivalent to data=data-mean(data) prior to the fft.
Regarding question 3: Yes.
Regarding question 4: As far as I am aware, yes. That is the reason why they combine these two steps in the example: n = length(y); power = abs(y(1:floor(n/2))).^2;
Regarding question 5: This drops out because of the Nyquist criterion. You can only meaningfully detect frequencies up to half of your sample frequency.
Hope this helps.
  2 Kommentare
FUJITA HIROYASU
FUJITA HIROYASU am 22 Mär. 2017
Thank for your kind explantion.
I have addtional comments.
** Portion of link contents **********
n = length(y);
power = abs(y(1:floor(n/2))).^2; % power of first half of transform data
maxfreq = 1/2; % maximum frequency
freq = (1:n/2)/(n/2)*maxfreq; % equally spaced frequency grid
period = 1./freq; ***************************************
Q1 n is number of data. Is it correct?
Q2 I do not know why n is halved[it means n/2]. ・power = abs(y(1:floor(n/2))).^2; ・freq = (1:n/2)/(n/2)*maxfreq;
I think Nyquist criterion is related only to the following.
maxfreq = 1/2;
Q3 Is it okay for the period to be the reciprocal of the frequency? period means time. Is it correct?
Best Regards. Hiro
Rik
Rik am 22 Mär. 2017
y is the Fourier transform, so n is the number of frequencies for which the magnitude was calculated.
The n/2 is related to the point that only half of the results are used for the power spectrum. I expect you are correct in your statement that the Nyquist criterion only matters for that maxfreq term.
The frequency is how many times an event occurs in a given unit of time, the period is the time between events. So the period and the frequency are each-others reciprocal.
Note: if my answer helped you, please mark it as accepted answer. We will both get reputation points and it will be easier for others with the same question to find the answer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Linear Model Identification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by