%% Implementation of MUSIC method for DOA estimation.
% Implemented according to Introduction to Direction-of-Arrival Estimation,
% Chen, Gokeda, Tu, Artech House, 2010.
%
%  INPUTS
%   R: Autocorrelation matrix of received data, complex double [M x M]
%   Delta: pitch between individual antennas in LUA relative to center
%          frequency, 0.5 typically, double [1 x 1]
%   antennaPos: positions of individual antennas in Delta units, for LUA it
%               would be (0:M-1).', or [0; 1; 2; ...; M-1], double [M x 1]
%   theta: for which azimuths the Music spectrum will be computed, rad,
%          double [n x 1]
%   d: number of targets for detection
%
%  OUTPUTS
%   P: spectrum computed using classical MUSIC, double [n x 1]
%   P_MN: spectrum computed using Minimum Norm MUSIC, double [n x 1]
%
% © 2020, Viktor Adler, CTU in Prague, adlervik@fel.cvut.cz
