function y = normpdftestbss(x,mu,sigma)
%NORMPDFTESTBSS Compute the values for the univariate normal PDF.
%
% INPUTS:
%
%    x:
%        A scalar value or column vector of points, as the rows, at which
%        the multivariate normal distribution is to be evaluated.
%
%     mu:
%        The mean value for the univariate normal distribution. If not
%        present a mean of 0 is used.
%
%     sigma:
%         The variance for the univariate normal distribution.
%         If not present a value of 1 is used.
%
% OUTPUTS:
%
%    y: 
%        Output values for the univariate normal distribution evalueated at
%        the points in x using the supplied mean and variance or the
%        default values.
%

%
% Copyright 2014-2018 Biometrics Northwest LLC
%

%
% Modified: 2018-08-24
% Author  : Kevin R. Gehringer
%
%     Added documentation and an error check on the input.
%
% Created: 2014-11-25
% Author : Kevin R. Gehringer
%

if (~(isscalar(x) || iscolumn(x)) )
    error('The input must be a scalar value or a column vector.');
end

switch nargin
   case 1
      mymu    = 0;
      mysigma = 1;
   case 2
      mymu    = mu;
      mysigma = 1;
   case 3
      mymu    = mu;
      mysigma = sigma;
   otherwise
      error('Incorrect number of arguments');
end

k = mysigma*(sqrt(2*pi));

tmp = (1/mysigma)*(x-mymu);
y = (1/k)*exp(-(1/2)*tmp.*tmp);
