This is a static copy of a profile report

Home

optimget>optimgetfast (208 calls, 0.020 sec)
Generated 14-Nov-2016 07:47:11 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/optimfun/optimget.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
optimgetfunction208
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
107
value = defaultopt.(name);
1300.010 s50.0%
108
end
1300 s0%
106
if isempty(value)
2080 s0%
101
value = options.(name);
2080 s0%
100
try
2080 s0%
All other lines  0.010 s50.0%
Totals  0.020 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
102The value assigned to variable 'ME' might be unused.
Coverage results
Show coverage for parent directory
Total lines in function26
Non-code lines (comments, blank lines)14
Code lines (lines that can run)12
Code lines that did run6
Code lines that did not run6
Coverage (did run/can run)50.00 %
Function listing
time 
calls 
 line
  83 
function value = optimgetfast(options,name,defaultopt)
  84 
%OPTIMGETFAST Get OPTIM OPTIONS parameter with no error checking so fast.
  85 
%   VAL = OPTIMGETFAST(OPTIONS,FIELDNAME,DEFAULTOPTIONS) will get the
  86 
%   value of the FIELDNAME from OPTIONS with no error checking or
  87 
%   fieldname completion. If the value is [], it gets the value of the
  88 
%   FIELDNAME from DEFAULTOPTIONS, another OPTIONS structure which is
  89 
%   probably a subset of the options in OPTIONS.
  90 
%
  91 

    208 
  92 
if isempty(options) 
  93 
     value = defaultopt.(name);
  94 
     return;
  95 
end
  96 
% We need to know if name is a valid field of options, but it is faster to use 
  97 
% a try-catch than to test if the field exists and if the field name is
  98 
% correct. If the options structure is from an older version of the
  99 
% toolbox, it could be missing a newer field.
    208 
 100 
try 
    208 
 101 
    value = options.(name); 
 102 
catch ME
 103 
    value = [];
 104 
end
 105 

    208 
 106 
if isempty(value) 
  0.01 
    130 
 107 
    value = defaultopt.(name); 
    130 
 108 
end 

Other subfunctions in this file are not included in this listing.