필터 지우기
필터 지우기

FFT of the average vs average of the FFT

조회 수: 35 (최근 30일)
Gianmarco Venditti
Gianmarco Venditti 2022년 4월 13일
편집: Paul 2022년 4월 13일
Hello everyone,
I've a (probably naive and simple question):
I've a NxM matrix (S): N measures, with M data point
I do the average along N and than compute the FFT =>
A = FFT(mean(S) )
on the other side I do first the FFT of each of the N measure and than I average along N:
B = mean(FFT(S))
Now my A and B are different, and look like that the average and FFT are not abelian operations.
However from my memory using the linearity of the Fourier transform and the Fubini-Tonelli theorem (you can switch sum and integral if every integral is finite) A and B should be the same.
I mean: the fourier transform of the average of a set of signals should be the average of the fourier transforms of eahc signals
.
Am I missing something? Should I expect my A and B to be the same? And if not, why?
Thanks in advance

답변 (1개)

Paul
Paul 2022년 4월 13일
편집: Paul 2022년 4월 13일
For a matrix input, fft() works down the columns. Maybe this:
rng(100);
S = rand(5);
fft(mean(S,1)) % mean for each column, fft of resulting row
ans =
2.3586 + 0.0000i -0.0250 + 0.2397i -0.1065 - 0.2300i -0.1065 + 0.2300i -0.0250 - 0.2397i
mean(fft(S.').',1) % fft of each row S, mean down the columns
ans =
2.3586 + 0.0000i -0.0250 + 0.2397i -0.1065 - 0.2300i -0.1065 + 0.2300i -0.0250 - 0.2397i

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by