Filter löschen
Filter löschen

FFT along third dimension

2 Ansichten (letzte 30 Tage)
ARN
ARN am 13 Aug. 2020
Kommentiert: Matt J am 18 Aug. 2020
Hi,
I am trying to understand the fft along 3rd dimension
a = [1 2 3 4; 5 6 7 8; 9 10 11 12];
b = [1 2 3 4; 5 6 7 8; 9 10 11 12];
num_samples = 3;
num_chirps = 4;
num_of_antenna = 2;
w_range = blackman(num_samples);
w_doppler = blackman(num_chirps)';
w_angle = blackman(num_of_antenna);
window_3d = w_range.*w_doppler.*permute(w_angle,[3 2 1]);
window_2d = w_range .* w_doppler;
windowed_a = a.*window_2d;
windowed_b = b.*window_2d;
g1 = fft2(windowed_a);
g2 = fft2(windowed_b);
windowed_cat = cat(3,g1,g2).*permute(w_angle,[3 2 1]);
g3 = abs(fft(windowed_cat,[],3));
concat_3d = cat(3,a,b);
windowed_3d = concat_3d.*window_3d;
fft_2d = fft2(window_3d);
fft_3d = abs(fft(fft_2d,[],3));
ff_3d = abs(fftn(window_3d));
Shouldn't this be ture
g3==fft_3d==ff_3d
Why are they not equal?

Antworten (1)

Matt J
Matt J am 13 Aug. 2020
Bearbeitet: Matt J am 13 Aug. 2020
They are equal,
>> isequal(g3, fft_3d ), isequal(g3 , ff_3d )
ans =
logical
1
ans =
logical
1
although in general, I think you should expect they might differ by small floating point errors.
If you literally typed in g3==fft_3d==ff_3d, then this will not be true for the same reason the following is not:
>> 2==2==2
ans =
logical
0
  6 Kommentare
ARN
ARN am 17 Aug. 2020
see the image
Matt J
Matt J am 18 Aug. 2020
Those look valid to me. Since w_angle contains only zeros, it makes sense that all fo the results should be approximately, if not exactly, zero.
>> w_angle = blackman(num_of_antenna)
w_angle =
0
0

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Measurements and Spatial Audio 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