To achieve the desired result of displaying both polar and rectangular plots of array’s radiation pattern simultaneously, we can use MATLAB’s figure management to separate the plots into distinct figures. This can be accomplished by calling the “figure” function before each plot command.
We can first create a figure for the polar plot and execute the “pattern” function with the “CoordinateSystem” set to “polar”. Then, we can create another figure with the “CoordinateSystem” set to “rectangular”.
Here is the complete MATLAB plot to achieve the same result:
% Create a circular planar array
radius = 0.085;
delta = 0.025;
n = round(radius/delta*2);
array = phased.URA;
array.Size = n;
array.ElementSpacing = delta;
array.Lattice = 'Rectangular';
pos = getElementPosition(array);
elemToRemove = sum(pos.^2) > radius^2;
pos(:,elemToRemove) = [];
h = phased.ConformalArray('ElementPosition', pos, ...
'ElementNormal', [1;0]*ones(1,size(pos,2)));
% Calculate Taper
nbar = 2;
sll = -30;
h.Taper = taylortaperc(pos, (0.085*2), nbar, sll);
w = getTaper(h);
viewArray(h, 'ShowTaper', true);
% Create Omnidirectional Microphone Element
el = phased.IsotropicHydrophone;
el.BackBaffled = true;
h.Element = el;
% Assign frequencies and propagation speed
F = 30000;
PS = 1500;
% Create figure for polar plot
figure;
cutAngle = 0;
pattern(h, F, -180:180, cutAngle, 'PropagationSpeed', PS, 'Type', ...
'powerdB', 'CoordinateSystem', 'polar');
title('Polar Plot');
% Create figure for rectangular plot
figure;
pattern(h, F, -180:180, cutAngle, 'PropagationSpeed', PS, 'Type', ...
'powerdB', 'CoordinateSystem', 'rectangular');
title('Rectangular Plot');
% Create legend
legend_string = cell(1, 1);
[Fval, ~, Fletter] = engunits(F);
legend_string{1} = [num2str(Fval) Fletter 'Hz; No Steering'];
legend(legend_string, 'Location', 'southeast');
Please find attached the documentation of functions used for reference:
I hope this assists in resolving the issue.