MATLAB: How to set the received signal in DoA algorithm

direction of arrivalmicrophone arrayPhased Array System Toolbox

Hello everyone,
I am trying to localize the direction of Arrival of my imported Signal using MUSIC algorithm. The size of my Signal (X) is 18182*32 which 32 is the number of the microphones. I use this Syntax to define my Signal: Y = collectPlaneWave(H,X,ANG,FREQ,C). Here I have attached the code and the error as well. The erros says somthing about a Zero value in my Signal which I could not get rid of. I would be grateful to get any help or comments from you.
The error is:
Error using coder.internal.errorIf (line 8)
The AIC algorithm is not applicable when one of the eigenvalues of signal covariance matrix is zero.
Error in phased.internal.aictest (line 22)
coder.internal.errorIf(any(eigenvals==0), ...
Error in phased.MUSICEstimator2D/getNumSignals (line 267)
D = phased.internal.aictest(eigenvals,K,fb);
Error in phased.MUSICEstimator2D/privDOASpectrum (line 224)
Nsig = getNumSignals(obj,eigenvals,obj.pNumSnapshots,fb);
Error in phased.MUSICEstimator2D/stepImpl (line 155)
numSignals = privDOASpectrum(obj,X);
Error in DOA32 (line 39)
[ang] = step(hDoA,x);
You need Phased Array System Toolbox to run the code.
Regards

Best Answer

Looks like you didn't add any noise so the AIC errors out. You can just add some noise, like
Y = Y + sqrt(npow/2)*(randn(size(Y))+1i*randn(size(Y)))
where npow is the noise power.
HTH