# beamwidth2gain

Compute antenna gain from azimuth and elevation beamwidths

## Syntax

``g = beamwidth2gain(hpbw)``
``g = beamwidth2gain(hpbw,at)``

## Description

example

````g = beamwidth2gain(hpbw)` returns the gain of an antenna given its half-power beamwidth, `hpbw`.```
````g = beamwidth2gain(hpbw,at)` also specifies the type of antenna aperture.```

## Examples

collapse all

Compute the antenna gain for a uniformly illuminated rectangular aperture. Specify an azimuth beamwidth of `1.4` degrees and an elevation beamwidth of `5` degrees.

```BWaz = 1.4; BWel = 5; g = beamwidth2gain([BWaz;BWel],'UniformRectangular')```
```g = 36.6522 ```

## Input Arguments

collapse all

Antenna half-power beamwidth in degrees, specified as a row vector or a two-row matrix.

• If `hpbw` is a row vector, then `beamwidth2gain` assumes a symmetric aperture and each element of `hpbw` specifies the same beamwidth for both azimuth and elevation dimensions.

• If `hpbw` is a two-row matrix, then its first row contains azimuth beamwidth values and its second row contains elevation beamwidth values.

Data Types: `double` | `single`

Antenna aperture type, specified as one of these:

• `'IdealRectangular'` — Rectangular beam with no sidelobes

• `'IdealElliptical'` — Elliptical beam with no sidelobes

• `'IdealGaussian'` — Gaussian beam with no sidelobes

• `'UniformRectangular'` — Uniformly illuminated rectangular aperture

• `'CosineRectangular'` — Cosine illuminated rectangular aperture

• `'UniformCircular'` — Uniformly illuminated circular aperture. In this case, `hpbw` must be either a row vector or a two-row matrix with identical rows because the beamwidth is the same in the azimuth and elevation dimensions.

• `'ParabolicCircular'` — Circular aperture parabolic-on-a-12 dB pedestal distribution. In this case, `hpbw` must be either a row vector or a two-row matrix with identical rows because the beamwidth is the same in the azimuth and elevation dimensions.

• `'PracticalGeneral'` — General-use practical antenna with sidelobes and null fill. For more details, see .

Data Types: `char` | `string`

## Output Arguments

collapse all

Antenna gain in dBi units, returned as a vector. The number of elements of `g` equals the number of columns of `hpbw`.

 Stutzman, Warren L., and Gary A. Thiele. Antenna Theory and Design. 3rd ed. Hoboken, NJ: Wiley, 2013.

 Stutzman, Warren L. “Estimating Directivity and Gain of Antennas.” IEEE Antennas and Propagation Magazine 40, no. 4 (August 1998): 7–11. https://doi.org/10.1109/74.730532.