This is a static copy of a profile report

Home

optimget>optimgetfast (41360 calls, 1.683 sec)
Generated 05-Aug-2011 13:03:51 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/funfun/optimget.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
optimgetfunction41360
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
103
value = options.(name);
412800.372 s22.1%
108
if isempty(value)
412800.328 s19.5%
94
if isempty(options)
413600.306 s18.2%
109
value = defaultopt.(name);
344000.175 s10.4%
102
try
412800.164 s9.7%
All other lines  0.339 s20.1%
Totals  1.683 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
104The 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 run8
Code lines that did not run4
Coverage (did run/can run)66.67 %
Function listing
   time   calls  line
85 function value = optimgetfast(options,name,defaultopt)
86 %OPTIMGETFAST Get OPTIM OPTIONS parameter with no error checking so fast.
87 % VAL = OPTIMGETFAST(OPTIONS,FIELDNAME,DEFAULTOPTIONS) will get the
88 % value of the FIELDNAME from OPTIONS with no error checking or
89 % fieldname completion. If the value is [], it gets the value of the
90 % FIELDNAME from DEFAULTOPTIONS, another OPTIONS structure which is
91 % probably a subset of the options in OPTIONS.
92 %
93
0.31 41360 94 if isempty(options)
0.01 80 95 value = defaultopt.(name);
80 96 return;
97 end
98 % We need to know if name is a valid field of options, but it is faster to use
99 % a try-catch than to test if the field exists and if the field name is
100 % correct. If the options structure is from an older version of the
101 % toolbox, it could be missing a newer field.
0.16 41280 102 try
0.37 41280 103 value = options.(name);
104 catch ME
105 value = [];
106 end
107
0.33 41280 108 if isempty(value)
0.17 34400 109 value = defaultopt.(name);
0.10 34400 110 end

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