gaussianKernel

Gaussian kernel

Contents

Syntax

y = gaussianKernel(u);
    

Description

gaussianKernel(u) returns the result of gaussian kernel function for u argument.

The result of a function depends on argument u and is described by following equation:

$$y(u) = \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}u^2}$$

Input arguments

Examples

Draw graph presented gaussian kernel. The input argument is a vector of doubles on the interval ranging from -3.5 to 3.5. Input vector contains 100 equally spaced elements.

u = linspace(-3.5, 3.5);
y = gaussianKernel(u);

plot(u, y, '.-');
xlabel('u'); ylabel('y(u)'); title('Gaussian kernel');
    

See also

uniformKernel | triangularKernel | epanechnikovKernel | cosineKernel