function x = norm_inv(F,muX,sigmaX)
% x = norm_inv(F,muX,sigmaX)
% return inverse normal distribution
%    F       - vector of probabilities ... 0 < F < 1
%    muX     - mean of X
%    sigmaX  - standard deviation of X
%    x       - set of values at which the CDF is computed
%
%    Reference: http://en.wikipedia.org/wiki/normal_distribution

  if nargin == 1
    muX    = 0;
    sigmaX = 1;
  end

 x = muX + sqrt(2)*sigmaX*erfinv( 2*F - 1); 

% -------------------------------------------------------------------- norm_inv
% HP Gavin 2024-02-20
