% z = normal1d(x, mean, variance)
%
% generate values for a 1D normal distribution
% copyright (c) 2008 by thilo stadelmann, stadelmann@informatik.uni-marburg.de

function y = normal1d(x, dimensions, mean, variance, compvariances)

    k = length(x);
    y = zeros(1, k);
    C = 1 / sqrt((2*pi)^dimensions*prod(compvariances));
    y = C .* exp(-0.5 .* (x-repmat(mean,1,k)).^2 ./ variance);


