# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# step

System object: phased.ArrayGain
Package: phased

Calculate array gain of sensor array

## Syntax

`G = step(H,FREQ,ANG)G = step(H,FREQ,ANG,WEIGHTS)G = step(H,FREQ,ANG,STEERANGLE)G = step(H,FREQ,ANG,WEIGHTS,STEERANGLE)`

## Description

 Note:   Starting in R2016b, instead of using the `step` method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, ```y = step(obj,x)``` and `y = obj(x)` perform equivalent operations.

`G = step(H,FREQ,ANG)` returns the array gain `G` of the array for the operating frequencies specified in `FREQ` and directions specified in `ANG`.

`G = step(H,FREQ,ANG,WEIGHTS)` applies weights `WEIGHTS` on the sensor array. This syntax is available when you set the `WeightsInputPort` property to `true`.

`G = step(H,FREQ,ANG,STEERANGLE)` uses `STEERANGLE` as the subarray steering angle. This syntax is available when you configure `H` so that `H.Sensor` is an array that contains subarrays, and `H.Sensor.SubarraySteering` is either `'Phase'` or `'Time'`.

`G = step(H,FREQ,ANG,WEIGHTS,STEERANGLE)` combines all input arguments. This syntax is available when you configure `H` so that `H.WeightsInputPort` is `true`, `H.Sensor` is an array that contains subarrays, and `H.Sensor.SubarraySteering` is either `'Phase'` or `'Time'`.

 Note:   The object performs an initialization the first time the `step` method is executed. This initialization locks nontunable properties (MATLAB) and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the `release` method to unlock the object.

## Input Arguments

 `H` Array gain object. `FREQ` Operating frequencies of array in hertz. `FREQ` is a row vector of length L. Typical values are within the range specified by a property of the sensor element. The element is `H.SensorArray.Element`, `H.SensorArray.Array.Element`, or `H.SensorArray.Subarray.Element`, depending on the type of array. The frequency range property is named `FrequencyRange` or `FrequencyVector`, depending on the type of element in the array. The element has zero response at frequencies outside that range. `ANG` Directions in degrees. `ANG` can be either a 2-by-M matrix or a row vector of length M. If `ANG` is a 2-by-M matrix, each column of the matrix specifies the direction in the form [azimuth; elevation]. The azimuth angle must be between –180 and 180 degrees, inclusive. The elevation angle must be between –90 and 90 degrees, inclusive. If `ANG` is a row vector of length M, each element specifies a direction's azimuth angle. In this case, the corresponding elevation angle is assumed to be 0. `WEIGHTS` Weights on the sensor array. `WEIGHTS` can be either an N-by-L matrix or a column vector of length N. N is the number of subarrays if `H.SensorArray` contains subarrays, or the number of elements otherwise. L is the number of frequencies specified in `FREQ`. If `WEIGHTS` is a matrix, each column of the matrix represents the weights at the corresponding frequency in `FREQ`. If `WEIGHTS` is a vector, the weights apply at all frequencies in `FREQ`. `STEERANGLE` Subarray steering angle in degrees. `STEERANGLE` can be a length-2 column vector or a scalar. If `STEERANGLE` is a length-2 vector, it has the form [azimuth; elevation]. The azimuth angle must be between –180 and 180 degrees, and the elevation angle must be between –90 and 90 degrees. If `STEERANGLE` is a scalar, it represents the azimuth angle. In this case, the elevation angle is assumed to be 0.

## Output Arguments

 `G` Gain of sensor array, in decibels. `G` is an M-by-L matrix. `G` contains the gain at the M angles specified in `ANG` and the L frequencies specified in `FREQ`.

## Examples

expand all

Construct a uniform linear array (ULA) having six elements and operating at 1 GHz. The array elements are spaced at one-half the operating wavelength. Find the array gain in dB in the direction 45° azimuth and 10° elevation.

Create the phased.ArrayGain System object™.

```fc = 1e9; lambda = physconst('LightSpeed')/fc; array = phased.ULA('NumElements',6,'ElementSpacing',lambda/2); gain = phased.ArrayGain('SensorArray',array); ```

Determine array gain at the specified operating frequency and angle.

```arraygain = gain(fc,[45;10]) ```
```arraygain = -17.9275 ```

expand all