This is a static copy of a profile reportHome
maketform>custom (1721 calls, 0.551 sec)
Generated 05-Nov-2014 07:53:03 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 | 1721 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
602 | t = assigntform(ndims_in, ndim... | 1721 | 0.160 s | 29.1% |  |
563 | if length(ndims_in) ~= 1 || ~i... | 1721 | 0.160 s | 29.1% |  |
568 | if length(ndims_out) ~= 1 || ~... | 1721 | 0.070 s | 12.7% |  |
551 | msgstruct = nargchk(5,5,nargin... | 1721 | 0.040 s | 7.3% |  |
583 | if ~isempty(forward_fcn) | 1721 | 0.020 s | 3.6% |  |
All other lines | | | 0.100 s | 18.2% |  |
Totals | | | 0.551 s | 100% | |
Children (called functions)
Code Analyzer results
Line number | Message |
551 | NARGCHK will be removed in a future release. Use NARGINCHK instead. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 54 |
Non-code lines (comments, blank lines) | 19 |
Code lines (lines that can run) | 35 |
Code lines that did run | 19 |
Code lines that did not run | 16 |
Coverage (did run/can run) | 54.29 % |
Function listing
time calls line
549 function t = custom( varargin )
550
0.04 1721 551 msgstruct = nargchk(5,5,nargin,'struct'); %#ok<NCHK>
0.01 1721 552 if ~isempty(msgstruct)
553 error(message('images:maketform:invalidNumInputsForCustom', msgstruct.message));
554 end
555
0.01 1721 556 ndims_in = varargin{1};
1721 557 ndims_out = varargin{2};
0.02 1721 558 forward_fcn = varargin{3};
1721 559 inverse_fcn = varargin{4};
0.02 1721 560 tdata = varargin{5};
561
562 % Validate sizes and types
0.16 1721 563 if length(ndims_in) ~= 1 || ~isdoubleinteger(ndims_in)
564
565 error(message('images:maketform:invalidNDims_In'))
566 end
567
0.07 1721 568 if length(ndims_out) ~= 1 || ~isdoubleinteger(ndims_out)
569
570 error(message('images:maketform:invalidNDims_Out'))
571 end
572
1721 573 if ndims_in < 1
574
575 error(message('images:maketform:nDimsInIsNotPositive'))
576 end
577
1721 578 if ndims_out < 1
579
580 error(message('images:maketform:nDimsOutIsNotPositive'))
581 end
582
0.02 1721 583 if ~isempty(forward_fcn)
0.01 1721 584 if length(forward_fcn) ~= 1 || ~isa(forward_fcn,'function_handle')
585
586 error(message('images:maketform:invalidForwardFcn'))
587 end
0.01 1721 588 end
589
1721 590 if ~isempty(inverse_fcn)
1721 591 if length(inverse_fcn) ~= 1 || ~isa(inverse_fcn,'function_handle')
592
593 error(message('images:maketform:invalidInverseFcn'))
594 end
0.01 1721 595 end
596
1721 597 if isempty(forward_fcn) && isempty(inverse_fcn)
598
599 error(message('images:maketform:emptyForwardAndInverseFcn'))
600 end
601
0.16 1721 602 t = assigntform(ndims_in, ndims_out, forward_fcn, inverse_fcn, tdata);
Other subfunctions in this file are not included in this listing.