# db2pow

Convert decibels to power

## Syntax

``y = db2pow(ydb)``

## Description

example

````y = db2pow(ydb)` returns the power measurements, `y`, that correspond to the decibel (dB) values specified in `ydb`. The relationship between power and decibels is `ydb` = 10 log10(`y`).```

## Examples

collapse all

Generate a 2-by-4-by-2 array of Gaussian random numbers. Assume the numbers are expressed in decibels and compute the corresponding power measurements.

```r = randn(2,4,2); pows = db2pow(r)```
```pows = pows(:,:,1) = 1.1318 0.5944 1.0762 0.9050 1.5254 1.2196 0.7400 1.0821 pows(:,:,2) = 2.2795 0.7328 1.1818 1.1789 1.8921 2.0114 0.9856 0.9539 ```

Use the definition to check the calculation.

`chck = 10.^(r/10)`
```chck = chck(:,:,1) = 1.1318 0.5944 1.0762 0.9050 1.5254 1.2196 0.7400 1.0821 chck(:,:,2) = 2.2795 0.7328 1.1818 1.1789 1.8921 2.0114 0.9856 0.9539 ```

## Input Arguments

collapse all

Input array in decibels, specified as a scalar, vector, matrix, or N-D array. When `ydb` is nonscalar, `db2pow` is an element-wise operation.

Data Types: `single` | `double`

## Output Arguments

collapse all

Power measurements, returned as a scalar, vector, matrix, or N-D array of the same size as `ydb`.

## Version History

Introduced in R2007b