This is a static copy of a profile report

Home

chi2inv (Calls: 9, Time: 0.026 sec)
Generated 28-May-2016 14:58:47 using performance time.
function in file /home/johs/MATLAB/R2015b/toolbox/stats/stats/chi2inv.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
Optimizer_cpu>Optimizer_cpu.scoreclass method9
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
x = gaminv(p,v/2,2);
90.019 s72.2%
25
[errorcode p v] = distchck(2,p...
90.007 s25.9%
27
if errorcode > 0
90.000 s0.0%
21
if nargin < 2, 
90.000 s0.0%
All other lines  0.000 s1.8%
Totals  0.026 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gaminvfunction90.007 s26.7%
distchckfunction90.002 s8.7%
Self time (built-ins, overhead, etc.)  0.017 s64.6%
Totals  0.026 s100% 
Code Analyzer results
Line numberMessage
25Best practice is to separate output variables with commas.
25Best practice is to separate output variables with commas.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)24
Code lines (lines that can run)8
Code lines that did run4
Code lines that did not run4
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
   1 
function x = chi2inv(p,v)
   2 
%CHI2INV Inverse of the chi-square cumulative distribution function (cdf).
   3 
%   X = CHI2INV(P,V)  returns the inverse of the chi-square cdf with V  
   4 
%   degrees of freedom at the values in P. The chi-square cdf with V 
   5 
%   degrees of freedom, is the gamma cdf with parameters V/2 and 2.   
   6 
%
   7 
%   The size of X is the common size of P and V. A scalar input
   8 
%   functions as a constant matrix of the same size as the other input.   
   9 
%
  10 
%   See also CHI2CDF, CHI2PDF, CHI2RND, CHI2STAT, ICDF.
  11 

  12 
%   References:
  13 
%      [1]  M. Abramowitz and I. A. Stegun, "Handbook of Mathematical
  14 
%      Functions", Government Printing Office, 1964, 26.4.
  15 
%      [2] E. Kreyszig, "Introductory Mathematical Statistics",
  16 
%      John Wiley, 1970, section 10.2 (page 144)
  17 

  18 
%   Copyright 1993-2010 The MathWorks, Inc.
  19 

  20 

< 0.01 
      9 
  21 
if nargin < 2,  
  22 
    error(message('stats:chi2inv:TooFewInputs'));
  23 
end
  24 

< 0.01 
      9 
  25 
[errorcode p v] = distchck(2,p,v); 
  26 

< 0.01 
      9 
  27 
if errorcode > 0 
  28 
    error(message('stats:chi2inv:InputSizeMismatch'));
  29 
end
  30 

  31 
% Call the gamma inverse function. 
  0.02 
      9 
  32 
x = gaminv(p,v/2,2);