필터 지우기
필터 지우기

FFT along third dimension

조회 수: 2 (최근 30일)
ARN
ARN 2020년 8월 13일
댓글: Matt J 2020년 8월 18일
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?

답변 (1개)

Matt J
Matt J 2020년 8월 13일
편집: Matt J 2020년 8월 13일
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
ARN
ARN 2020년 8월 17일
see the image
Matt J
Matt J 2020년 8월 18일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by