This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
maketform | function | 3442 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
663 | t = box2(inbounds,outbounds); | 3442 | 0.861 s | 58.1% |  |
626 | if ~isdoubleinteger(tsize) | 3442 | 0.170 s | 11.5% |  |
656 | inbounds = [ones(1,N); tsize'... | 3442 | 0.080 s | 5.4% |  |
609 | if ~isempty(msgstruct) | 3442 | 0.060 s | 4.1% |  |
647 | if length(lo) ~= N || length(h... | 3442 | 0.040 s | 2.7% |  |
All other lines | | | 0.270 s | 18.2% |  |
Totals | | | 1.482 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
maketform>box2 | subfunction | 3442 | 0.791 s | 53.4% |  |
maketform>isdoubleinteger | subfunction | 3442 | 0.130 s | 8.8% |  |
Self time (built-ins, overhead, etc.) | | | 0.561 s | 37.8% |  |
Totals | | | 1.482 s | 100% | |
Code Analyzer results
Line number | Message |
608 | NARGCHK will be removed in a future release. Use NARGINCHK instead. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 58 |
Non-code lines (comments, blank lines) | 21 |
Code lines (lines that can run) | 37 |
Code lines that did run | 19 |
Code lines that did not run | 18 |
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.