db2mag
Convert decibels to magnitude
Syntax
Description
Examples
Magnitudes 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 magnitudes.
r = randn(2,4,2); mags = db2mag(r)
mags = mags(:,:,1) = 1.0639 0.7710 1.0374 0.9513 1.2351 1.1044 0.8602 1.0402 mags(:,:,2) = 1.5098 0.8561 1.0871 1.0858 1.3755 1.4182 0.9928 0.9767
Use the definition to check the calculation.
chck = 10.^(r/20)
chck = chck(:,:,1) = 1.0639 0.7710 1.0374 0.9513 1.2351 1.1044 0.8602 1.0402 chck(:,:,2) = 1.5098 0.8561 1.0871 1.0858 1.3755 1.4182 0.9928 0.9767
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, db2mag
is an element-wise operation.
Data Types: single
| double
Output Arguments
y
— Magnitude measurements
scalar | vector | matrix | N-D array
Magnitude measurements, returned as a scalar, vector, matrix, or N-D array
of the same size as ydb
.
Version History
Introduced in R2008a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)