MATLAB: How Array gain is calculated in Phased array

arrayarray designPhased Array System Toolboxphased array toolbox

In text books on phased array there are standard equations for array gains of phased arrays (for linear , circular etc)
But I am unable to match the array gains same with Matlab's array gain obtained in Phased Array toolbox
The formula given in http://www.mathworks.in/help/phased/ref/phased.arraygain-class.html but i am observing same aray gain with or without steering.

Best Answer

The ArrayGain in Phased Array System Toolbox calculates the SNR improvement due to the array. The computation is outlined in the reference page as the ratio of SNR at the output of the array over SNR at the input of the array. This is more relevant for array signal processing but may not be what you are looking for.
Since you are asking this question, if I'm not mistaken, you are looking for the gain in terms of directivity instead? If that's the case, you can plot the directivity of the array by setting the unit as dbi, e.g.,
% Compute the directivity of a 10-element ULA with quarter
% wavelength spacing. The element is assumed to be isotropic.
c = 3e8; fc = 3e8; lambda = c/fc;
myArray = phased.ULA(10,lambda/4);
plotResponse(myArray,fc,c,'Type','dbi')
The above code should work since R2014a and if you have the latest R2014b, you can also compute the directivity for a given direction directly, such as
d = directivity(myArray,fc,0,'PropagationSpeed',c)
HTH