As per latest MATLAB Documentation, the "rootmusicdoa" function is primarily designed for Uniform Linear Arrays (ULA) and may not work with non-linear arrays like L-shaped configurations.
For such cases, you could use the "phased.MUSICEstimator2D" function from MATLAB's Phased Array System Toolbox, which is capable of handling 2D or 3D planar arrays.
Here's an example demonstrating how to estimate the DOA for an L-shaped array where a signal arrives from -37° azimuth and 0° elevation:
doa = [-37; 0]; % Azimuth and elevation angles
fc = 150e6;
c = physconst('LightSpeed');
lam = c/fc;
fs = 8000;
f = 450.0;
% Create element positions for the L-shaped array
N1 = 5; % Number of elements in the first arm of the L
N2 = 4; % Number of elements in the second arm of the L (excluding corner)
d = lam/2; % Element spacing in meters
% First arm along the x-axis
xPos1 = (0:N1-1) * d;
yPos1 = zeros(1, N1);
zPos1 = zeros(1, N1);
% Second arm along the y-axis (starting from d to avoid overlap)
xPos2 = zeros(1, N2);
yPos2 = (1:N2) * d;
zPos2 = zeros(1, N2);
% Concatenate positions
xPos = [xPos1, xPos2];
yPos = [yPos1, yPos2];
zPos = [zPos1, zPos2];
% Create conformal array
array = phased.ConformalArray('ElementPosition', [xPos; yPos; zPos]);
array.Element.FrequencyRange = [50.0e6 500.0e6];
figure;
viewArray(array);
title('L-Shaped Planar Array of Isotropic Antennas');
array.Element.FrequencyRange = [50.0e6 500.0e6];
% Generate signal
t = (0:1/fs:1).';
x1 = cos(2*pi*t*f);
%Simulate received signals at the sensor array
x = collectPlaneWave(array,x1,doa,fc);
noise = 0.1*(randn(size(x))+1i*randn(size(x)));
% Estimate DOA using MUSIC
estimator = phased.MUSICEstimator2D('SensorArray', array, ...
'OperatingFrequency', fc, ...
'NumSignalsSource', 'Property', ...
'DOAOutputPort', true, ...
'NumSignals', 1, ...
'AzimuthScanAngles', -50:0.5:50, ...
'ElevationScanAngles', -30:0.5:30);
[~,doa]=estimator(x + noise)
% Plot the spectrum
figure;
plotSpectrum(estimator);
Please refer to the following documentation to know more