Home > atmlab > math > gauss.m

gauss

PURPOSE ^

GAUSS The Gauss function

SYNOPSIS ^

function y = gauss(x,s,m)

DESCRIPTION ^

 GAUSS   The Gauss function

    Calculates the scalar Gauss function:

      y = 1/(s*sqrt(2*pi)) * exp(-0.5((x-m)/(s))^2)

    where x is a vector.

 FORMAT   y = gauss(x,s,m)
        
 OUT   y   Function values
 IN    x   Input vector
       s   Standdard deviation
       m   Mean

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

gauss.m

SOURCE CODE ^

0001 % GAUSS   The Gauss function
0002 %
0003 %    Calculates the scalar Gauss function:
0004 %
0005 %      y = 1/(s*sqrt(2*pi)) * exp(-0.5((x-m)/(s))^2)
0006 %
0007 %    where x is a vector.
0008 %
0009 % FORMAT   y = gauss(x,s,m)
0010 %
0011 % OUT   y   Function values
0012 % IN    x   Input vector
0013 %       s   Standdard deviation
0014 %       m   Mean
0015 
0016 % 2006-03-02   Created by Stefan Buehler
0017 
0018 function y = gauss(x,s,m)
0019 
0020 y = 1.0 / ( s * sqrt(2.0*pi) ) * exp( -0.5 * ((x-m)/s).^2 );

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005