# bandwidth

Calculate and/or plot absolute bandwidth of antenna

Since R2024a

## Syntax

``[absBW, fRES, fL, fU, S] = bandwidth(object,frequency)``
``[absBW, fRES, fL, fU, S] = bandwidth(object,frequency,Name=Value)``
``[absBW,___] = bandwidth(object,frequency)``
``[absBW,___] = bandwidth(object,frequency,Name=Value)``
``bandwidth(object,frequency)``
``bandwidth(___,Name=Value)``

## Description

example

````[absBW, fRES, fL, fU, S] = bandwidth(object,frequency)` calculates and returns the absolute bandwidths `absBW` for each resonant frequency in `fRES`, and its lower (`fL`) and upper (`fU`) bounds for the specified antenna. `absBW` and `fRES` are empty if no bandwidth and/or resonant frequency is detected within the frequency sweep. And, they are vectors when there is more than one bandwidth. `S` is the vector of the entire `S11` values spanning across the specified frequency band.```
````[absBW, fRES, fL, fU, S] = bandwidth(object,frequency,Name=Value)` uses additional options specified by one or more Name-Value Arguments to calculate the absolute bandwidths `absBW` for each resonant frequency in `fRES`, and its lower (`fL`) and upper (`fU`) bounds for the specified antenna.```
````[absBW,___] = bandwidth(object,frequency)` calculates and returns the absolute bandwidths `absBW` for each resonant frequency and other parameters.```
````[absBW,___] = bandwidth(object,frequency,Name=Value)` uses additional options specified by one or more Name-Value Arguments to calculate and return the absolute bandwidths `absBW` for each resonant frequency and other parameters.```
````bandwidth(object,frequency)` plots the `S11` for the specified frequency range and marks the bandwidth on the plot.```
````bandwidth(___,Name=Value)` uses additional options specified by one or more Name-Value Arguments to plot the `S11` for the specified frequency range and mark the bandwidth on the plot.```

## Examples

collapse all

This example shows how to calculate and plot the bandwidth of a dipole antenna for different thresholds.

Create Dipole, Calculate and Plot Bandwidth with Default Threshold

Create a dipole operating at 75MHz. Calculate and plot the bandwidth of a dipole for a default threshold of -10dB over a frequency span 50MHz to 100MHz.

```h = design(dipole,75e6); absBW = bandwidth(h,50e6:1e6:100e6)```
```absBW = 6.6737e+06 ```
`bandwidth(h,50e6:1e6:100e6);`

Calculate and Plot Bandwidth with Custom Threshold

Calculate and plot the bandwidth of the same dipole, using a -2dB threshold, over the same frequency span.

`absBW = bandwidth(h,50e6:1e6:100e6,Threshold=-2)`
```absBW = 3.4303e+07 ```
`bandwidth(h,50e6:1e6:100e6,Threshold=-2);`

## Input Arguments

collapse all

Antenna to calculate bandwidth, specified as an antenna object.

Example: `dipole`

Frequency sweep in Hz to calculate the bandwidth, specified as a positive vector.

Example: [50e6:5e6:80e6]

Data Types: `double`

### Name-Value Arguments

Specify optional pairs of arguments as `Name1=Value1,...,NameN=ValueN`, where `Name` is the argument name and `Value` is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: `Threshold=-2;`

Flag to enable parallel pool, specified as a logical value. The default value is `false`. Set the flag to `true` or `1` to enable the parallel pool. Use parallel pool to speedup the bandwidth calculations at multiple frequencies for computationally large antennas and arrays. To use this feature, you need a license to the Parallel Computing Toolbox™.

Example: `UseParallel=true`

Data Types: `logical`

Reference impedance in ohms to calculate the S-parameters, specified as a positive real scalar. The default reference impedance is 50 ohms.

Example: 75

Data Types: `double`

`S11` threshold value in dB to calculate bandwidth, specified as numeric scalar.

Example: -12

Data Types: `double`

Logical flag to enable or disable data tips, specified as either `true` to enable or `false` to disable. By default, the data tips are enabled.

Example: `false`

Data Types: `logical`

## Output Arguments

collapse all

Absolute bandwidth in Hz of the specified antenna, returned as either positive scalar value for a single resonance or a positive vector for multiple resonances within the specified frequency sweep.

Example: 30e6

Resonant frequency in Hz of the specified antenna, returned as either positive scalar value for a single resonance or a positive vector for multiple resonances within the specified frequency sweep.

Example: 6.67e9

Data Types: `double`

Lower frequency bound of bandwidth in Hz, returned as scalar for a single resonance or a vector for multiple resonances within the specified frequency sweep.

Example: 6.64e9

Data Types: `double`

Upper frequency bound of bandwidth in Hz, returned as scalar for a single resonance or a vector for multiple resonances within the specified frequency sweep.

Example: 6.7e9

Data Types: `double`

`S11` values in dB for the entire frequency sweep, returned as a complex vector.

Data Types: `double`
Complex Number Support: Yes

## Version History

Introduced in R2024a