This is a static copy of a profile report

Home

classifyBoundsOnVars>equalFloat (860 calls, 0.055 sec)
Generated 05-Aug-2011 13:03:54 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/optim/optim/classifyBoundsOnVars.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
classifyBoundsOnVarsfunction860
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
49
finiteRange_idx = isfinite(v1(...
8600.022 s40.0%
53
isEqual_idx = finiteRange_idx ...
8600.011 s20.0%
54
abs(v1(:)-v2(:)) <= toleran...
8600 s0%
All other lines  0.022 s40.0%
Totals  0.055 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function12
Non-code lines (comments, blank lines)9
Code lines (lines that can run)3
Code lines that did run3
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
43 function isEqual_idx = equalFloat(v1,v2,tolerance)
44 %equalFloat Helper function that compares two vectors
45 % using a relative difference and returns a boolean
46 % vector.
47
48 % Indices for which both v1 and v2 are finite
0.02 860 49 finiteRange_idx = isfinite(v1(:)) & isfinite(v2(:));
50
51 % Indices at which v1 and v2 are (i) finite and (ii) equal in a
52 % floating point sense
0.01 860 53 isEqual_idx = finiteRange_idx & ...
860 54 abs(v1(:)-v2(:)) <= tolerance*max( 1,max(abs(v1(:)),abs(v2(:))) );