FFT along third dimension

3 visualizaciones (últimos 30 días)
ARN
ARN el 13 de Ag. de 2020
Comentada: Matt J el 18 de Ag. de 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?

Respuestas (1)

Matt J
Matt J el 13 de Ag. de 2020
Editada: Matt J el 13 de Ag. de 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 comentarios
ARN
ARN el 17 de Ag. de 2020
see the image
Matt J
Matt J el 18 de Ag. de 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

Iniciar sesión para comentar.

Categorías

Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by