This is a static copy of a profile report

Home

maketform>box2 (3442 calls, 0.791 sec)
Generated 05-Nov-2014 07:53:02 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/maketform.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
maketform>boxsubfunction3442
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
712
t = assigntform(N, N, @fwd_box...
34420.340 s43.0%
676
if ~isfinitedouble(inBounds)
34420.140 s17.7%
680
if ~isfinitedouble(outBounds)
34420.110 s13.9%
710
tdata.shift = outBounds(1,:) -...
34420.050 s6.3%
695
qDegenerate  = (inBounds(1,:) ...
34420.030 s3.8%
All other lines  0.120 s15.2%
Totals  0.791 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
maketform>assigntformsubfunction34420.200 s25.3%
maketform>isfinitedoublesubfunction68840.150 s19.0%
Self time (built-ins, overhead, etc.)  0.441 s55.7%
Totals  0.791 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function46
Non-code lines (comments, blank lines)25
Code lines (lines that can run)21
Code lines that did run13
Code lines that did not run8
Coverage (did run/can run)61.90 %
Function listing
   time   calls  line
667 function t = box2( inBounds, outBounds )
668
669 % Construct an affine TFORM struct that maps a box bounded by INBOUNDS(1,k)
670 % and INBOUNDS(2,k) in dimensions k to a box bounded by OUTBOUNDS(1,k) and
671 % OUTBOUNDS(2,k).
672 %
673 % inBounds: 2-by-N
674 % outBounds: 2-by-N
675
0.14 3442 676 if ~isfinitedouble(inBounds)
677 error(message('images:maketform:invalidInbounds'))
678 end
679
0.11 3442 680 if ~isfinitedouble(outBounds)
681 error(message('images:maketform:invalidOutbounds'))
682 end
683
0.02 3442 684 N = size(inBounds,2);
3442 685 if (ndims(inBounds) ~= 2 ...
686 || ndims(outBounds) ~= 2 ...
687 || size(inBounds,1) ~= 2 ...
688 || size(outBounds,1) ~= 2 ...
689 || size(outBounds,2) ~= N)
690
691 error(message('images:maketform:inboundsAndOutbounds2ByN'))
692
693 end
694
0.03 3442 695 qDegenerate = (inBounds(1,:) == inBounds(2,:));
3442 696 if any((outBounds(1,:) == outBounds(2,:)) ~= qDegenerate)
697
698 error(message('images:maketform:invalidInboundsAndOutbounds'))
699
700 end
701
0.01 3442 702 num = outBounds(2,:) - outBounds(1,:);
0.02 3442 703 den = inBounds(2,:) - inBounds(1,:);
704
705 % Arbitrarily set the scale to unity for degenerate dimensions.
0.02 3442 706 num(qDegenerate) = 1;
3442 707 den(qDegenerate) = 1;
708
0.02 3442 709 tdata.scale = num ./ den;
0.05 3442 710 tdata.shift = outBounds(1,:) - tdata.scale .* inBounds(1,:);
711
0.34 3442 712 t = assigntform(N, N, @fwd_box, @inv_box, tdata);

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