db2pow
Convert decibels to power
Syntax
Description
Examples
Power Values of Random Numbers
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
ydb
— Input array in decibels
scalar | vector | matrix | N-D array
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
y
— Power measurements
scalar | vector | matrix | N-D array
Power measurements, returned as a scalar, vector, matrix, or N-D array of
the same size as ydb
.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2007b
Apri esempio
Si dispone di una versione modificata di questo esempio. Desideri aprire questo esempio con le tue modifiche?
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)