www.gusucode.com > signal 案例源码程序 matlab代码 > signal/MagnitudesOfRandomNumbersExample.m

    %% 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.

% Copyright 2015 The MathWorks, Inc.


r = randn(2,4,2);

mags = db2mag(r)
%% 
% Use the definition to check the calculation.

chck = 10.^(r/20)