This is a static copy of a profile report

Home

maketform>box (3442 calls, 1.482 sec)
Generated 05-Nov-2014 07:53:05 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
maketformfunction3442
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
663
t = box2(inbounds,outbounds);
34420.861 s58.1%
626
if ~isdoubleinteger(tsize)
34420.170 s11.5%
656
inbounds  = [ones(1,N); tsize'...
34420.080 s5.4%
609
if ~isempty(msgstruct)
34420.060 s4.1%
647
if length(lo) ~= N || length(h...
34420.040 s2.7%
All other lines  0.270 s18.2%
Totals  1.482 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
maketform>box2subfunction34420.791 s53.4%
maketform>isdoubleintegersubfunction34420.130 s8.8%
Self time (built-ins, overhead, etc.)  0.561 s37.8%
Totals  1.482 s100% 
Code Analyzer results
Line numberMessage
608NARGCHK will be removed in a future release. Use NARGINCHK instead.
Coverage results
[ Show coverage for parent directory ]
Total lines in function58
Non-code lines (comments, blank lines)21
Code lines (lines that can run)37
Code lines that did run19
Code lines that did not run18
Coverage (did run/can run)51.35 %
Function listing
   time   calls  line
606 function t = box( varargin )
607
0.04 3442 608 msgstruct = nargchk(2,3,nargin,'struct'); %#ok<NCHK>
0.06 3442 609 if ~isempty(msgstruct)
610 error(message('images:maketform:invalidNumInputsForBox', msgstruct.message));
611 end
612
0.02 3442 613 if nargin == 3
614 % Construct an affine TFORM struct that maps a box bounded by 1 and TSIZE(k)
615 % in dimension k to a box bounded by LO(k) and HI(k) in dimension k.
616 % Construct INBOUNDS and OUTBOUNDS arrays, then call BOX2.
617
0.03 3442 618 tsize = varargin{1};
0.01 3442 619 lo = varargin{2};
3442 620 hi = varargin{3};
621
0.01 3442 622 tsize = tsize(:);
0.03 3442 623 lo = lo(:);
3442 624 hi = hi(:);
625
0.17 3442 626 if ~isdoubleinteger(tsize)
627
628 error(message('images:maketform:invalidTSize'))
629 end
630
3442 631 if any(tsize < 1 )
632
633 error(message('images:maketform:tSizeIsNotPositive'))
634 end
635
0.03 3442 636 if ~isa(lo,'double') || ~isreal(lo) || ~all(isfinite(lo))
637
638 error(message('images:maketform:invalidLo'))
639 end
640
0.04 3442 641 if ~isa(hi,'double') || ~isreal(hi) || ~all(isfinite(hi))
642
643 error(message('images:maketform:invalidHi'))
644 end
645
3442 646 N = length(tsize);
0.04 3442 647 if length(lo) ~= N || length(hi) ~= N
648
649 error(message('images:maketform:unequalLengthsForLoHiAndTSize'))
650 end
651
0.01 3442 652 if any(lo == hi & ~(tsize == 1))
653 error(message('images:maketform:invalidLoAndHi'))
654 end
655
0.08 3442 656 inbounds = [ones(1,N); tsize'];
3442 657 outbounds = [lo'; hi'];
658 else
659 inbounds = varargin{1};
660 outbounds = varargin{2};
661 end
662
0.86 3442 663 t = box2(inbounds,outbounds);

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