cosmo norminv hdr

function y=cosmo_norminv(p,mu,sd)
% compute inverse normal cumulative distribution function
%
% y=cosmo_norminv(p[,mu[,sd]])
%
% Inputs:
%   p               array with p values
%   mu              optional scalar or array with mean values, default 0
%   sd              optional scalar or array with standard deviation
%                   values, default 1
%
% Output:
%   y               array with the same size as p, so that if
%                       z=(y-mu)/sd
%                   it holds that normcdf(z)==p
%
% Notes:
%   - mu and sd can be scalar or arrays, but their size must be compatible
%     with that of p.
%
% #   For CoSMoMVPA's copyright information and license terms,   #
% #   see the COPYING file distributed with CoSMoMVPA.           #