RESP = step(H,FREQ,ANG)
Note:
Starting in R2016b, instead of using the 
returns
the antenna's voltage response RESP
= step(H
,FREQ
,ANG
)RESP
at
operating frequencies specified in FREQ
and directions
specified in ANG
.
Note:
The object performs an initialization the first time the 

Antenna element object. 

Operating frequencies of antenna in hertz. 

Directions in degrees. If If 

Voltage response of antenna element specified as an MbyL,
complexvalued matrix. In this matrix, M represents
the number of angles specified in 
The step
method returns the field
response (or field pattern)
$$f(az,el)={\mathrm{cos}}^{m}(az){\mathrm{cos}}^{n}(el)$$
of the cosine antenna element.
In this expression
az is the azimuth angle.
el is the elevation angle.
The exponents m and n are real numbers greater than zero.
The response is defined for azimuth and elevation angles between –90° and 90°, inclusive, and is always positive. There is no response at the backside of a cosine antenna. The cosine response pattern achieves a maximum value of 1 at 0° azimuth and 0° elevation. Larger exponent values narrow the response pattern of the element and increase the directivity.
The power response (or power pattern) is the squared value of the field response.
$$P(az,el)={\mathrm{cos}}^{2m}(az){\mathrm{cos}}^{2n}(el)$$
Construct a cosine antenna element. The cosine response is raised to a power of 1.5. The antenna frequency range is the IEEE^{®} X band from 8 to 12 GHz. The antenna operates at 10 GHz. Obtain the antenna's response for an incident angle of 30 degrees azimuth and 5 degrees elevation.
hant = phased.CosineAntennaElement(... 'FrequencyRange',[8e9 12e9],... 'CosinePower',1.5); % operating frequency fc = 10e9; % incident angle ang = [30;5]; % use the step method to obtain the antenna's response resp = step(hant,fc,ang);