function theResult = mdchi(p, dof)

% mdchi -- IMSL "MDCHI" emulator.
%  mdchi(p, dof1) calls "inv_chi_square" to return
%   the equivalent of MDCHI(P, DOF1), for probability
%   p and degrees-of-freedom dof.
 
% Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO.
%  All Rights Reserved.
%   Disclosure without explicit written consent from the
%    copyright owner does not constitute publication.
 
% Version of 25-Jan-1999 15:35:57.

if nargin < 2, help(mfilename); return, end

if ischar(p), p = eval(p); end
if ischar(dof), dof = eval(dof); end

result = inv_chi_square(p, dof);

if nargout > 0
	theResult = result;
else
	disp(result)
end
