**Name**

**smse** Computes the mean square error between two fsignals

**Command Synopsis**

**smse** [-n] *Signal1* *Signal2* *.* *.* *.* *.*

-n : flag to normalize the signals

Signal1: original signal

Signal2: reconstructed signal

. (screen output) : signal to noise ratio / `Sig1` (SNR)

. (screen output) : peak signal to noise ratio / `Sig1` (PSNR)

. (screen output) : mean square error between Sig1 and Sig2 (MSE)

. (screen output) : maximal relative difference (MRD)

**Function Summary**

void smse (Sig1 , Sig2 , Norm , SNR , PSNR , MSE , MRD )

Fsignal Sig1 , Sig2 ;

int *Norm ;

double *SNR ;

double *PSNR ;

double *MSE ;

double *MRD ;

**Description**

*smse* computes the maximal relative difference, mean square error, signal to noise ratio, and peak signal to noise ratio between two univariate digitized signals whose sample values are read in files *Signal1* and *Signal2*.

The maximal relative difference is given by

The mean square error is defined by

In maximal relative difference and mean square difference the two signals have symetric roles. This is no longer the case in (peak) signal to noise ratio.
These quantities can be calculated for any two signals, but are more meaningful if *f*_{1} is considered as an original signal and *f*_{2} as an approximation to it. The signal to noise ratio and peak signal to noise ratio are defined as follows

The -n option specifies that the two signals are normalized to 0.0 mean and 1.0 variance before the computation of the quantities listed above.

**See Also**

**Version 1.02**

Last Modification date : Thu Apr 15 01:04:32 2004

**Author**

Jean-Pierre D'Ales, Jacques Froment