bpdq_compute_snr

PURPOSE ^

bpdq_compute_snr : Calculate SNR

SYNOPSIS ^

function snr=bpdq_compute_snr(u,v)

DESCRIPTION ^

 bpdq_compute_snr : Calculate SNR

 snr=bpdq_compute_snr(u,v)
 
 Note : Signals are assumed to be zero mean, so signal and noise
 power computed without explicitly subtracting off the mean.

 Inputs :
 u,v input signals

 Outputs:
 snr - calculated SNR (in dB)

 This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer)
 Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with
 this library) (See the notice at the end of the file.)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % bpdq_compute_snr : Calculate SNR
0002 %
0003 % snr=bpdq_compute_snr(u,v)
0004 %
0005 % Note : Signals are assumed to be zero mean, so signal and noise
0006 % power computed without explicitly subtracting off the mean.
0007 %
0008 % Inputs :
0009 % u,v input signals
0010 %
0011 % Outputs:
0012 % snr - calculated SNR (in dB)
0013 %
0014 % This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer)
0015 % Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with
0016 % this library) (See the notice at the end of the file.)
0017 
0018 function snr=bpdq_compute_snr(u,v)
0019   snr=20*log10(norm(u)/norm(u-v));
0020   
0021 % The BPDQ Toolbox is free software: you can redistribute it and/or modify
0022 % it under the terms of the GNU General Public License as published by
0023 % the Free Software Foundation, either version 3 of the License, or
0024 % (at your option) any later version.
0025 %
0026 % The BPDQ Toolbox is distributed in the hope that it will be useful,
0027 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0028 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0029 % GNU General Public License for more details.
0030 %
0031 % You should have received a copy of the GNU General Public License
0032 % along with The BPDQ Toolbox.  If not, see <http://www.gnu.org/licenses/>.
0033

Generated on Mon 06-Jul-2009 14:16:10 by m2html © 2003