MATLAB: Is there a way to extract numerical information on the antenna directivity as opposed to just visualizing it using the pattern command

antennaarraydirectivitymatrixpattern plotphased arrayPhased Array System Toolbox

I'm using the Phased array toolbox to plot an antenna array directivity pattern. Is there a way to extract numerical information on the antenna directivity as opposed to visualizing it using the pattern command to plot. Extracting a 3D matrix would be ideal.
az = -180:180; el = -90:90; fc = 2.5e9; xpos=[0 1 2 3]; ypos=[0 0 0 0]; zpos=[0 0 0 0];
elresp = cosd(el);
antenna = phased.CustomAntennaElement('AzimuthAngles',az,'ElevationAngles',el,'MagnitudePattern',repmat(elresp',1,numel(az)));
array = phased.ConformalArray('Element',antenna,'ElementPosition',[xpos; ypos; zpos], 'ElementNormal',[normal_az; normal_el]);
pattern(array,fc,az,el,'CoordinateSystem','polar','Type','directivity', 'PropagationSpeed',physconst('LightSpeed'))

Best Answer

Yes, if you want the entire pattern, you can just specify an output, like
[D,az,el] = pattern(array,fc,az,el,'Type','directivity');
On the other hand, if you just want to compute directivity values for certain directions, you can consider using directivity() method, as
D = directivity(array,fc,[az;el])
HTH