32 lines
880 B
Matlab
32 lines
880 B
Matlab
function [ echo_sFFT_mtx, angle_index ] = spatial_FFT(echo_mtx, d, lambda)
|
|
% FFT for echo space domain
|
|
%
|
|
% Usage:
|
|
% [echo_sFFT_mtx, angle_index] = spatial_FFT(echo_mtx, d, lambda)
|
|
%
|
|
% Inputs:
|
|
% echo_mtx: Matrix containing the echo data
|
|
% d: Antenna spacing
|
|
% lambda: Wave length
|
|
%
|
|
% Outputs:
|
|
% echo_sFFT_mtx: Processed echo matrix
|
|
% angle_index: True value of the angle
|
|
|
|
|
|
% parameters
|
|
[lenA, lenR, lenP] = size(echo_mtx);
|
|
|
|
% calculate angle
|
|
angle_index = asin(-1 * (-1/2: 1/lenA: 1/2 - 1/lenA) * lambda / d) / pi * 180;
|
|
|
|
% spatial FFT
|
|
echo_mtx = reshape(echo_mtx, [lenA, lenR * lenP]);
|
|
echo_sFFT_mtx = zeros(size(echo_mtx));
|
|
for i = 1: lenR * lenP
|
|
echo_sFFT_mtx(:, i) = fftshift(fft(echo_mtx(:, i))) ./ sqrt(lenA);
|
|
end
|
|
echo_sFFT_mtx = reshape(echo_sFFT_mtx, [lenA, lenR, lenP]);
|
|
|
|
end
|