This is a static copy of a profile report

Home

maketform>affine (1721 calls, 0.801 sec)
Generated 05-Nov-2014 07:53:01 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
maketformfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
167
A = validate_matrix( A, 'affin...
17210.401 s50.0%
177
t = assigntform(N, N, @fwd_aff...
17210.180 s22.5%
171
tdata.Tinv = inv(A);
17210.100 s12.5%
153
if ~isempty(msgstruct)
17210.030 s3.8%
175
tdata.Tinv(end,end) = 1;
17210.020 s2.5%
All other lines  0.070 s8.8%
Totals  0.801 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
maketform>validate_matrixsubfunction17210.360 s45.0%
maketform>assigntformsubfunction17210.120 s15.0%
Self time (built-ins, overhead, etc.)  0.320 s40.0%
Totals  0.801 s100% 
Code Analyzer results
Line numberMessage
152NARGCHK will be removed in a future release. Use NARGINCHK instead.
Coverage results
[ Show coverage for parent directory ]
Total lines in function30
Non-code lines (comments, blank lines)11
Code lines (lines that can run)19
Code lines that did run13
Code lines that did not run6
Coverage (did run/can run)68.42 %
Function listing
   time   calls  line
148 function t = affine( varargin )
149
150 % Build an affine TFORM struct.
151
0.02 1721 152 msgstruct = nargchk(1,2,nargin,'struct'); %#ok<NCHK>
0.03 1721 153 if ~isempty(msgstruct)
154 error(message('images:maketform:invalidNumInputsForAffine', msgstruct.message));
155 end
156
1721 157 if nargin == 2
158 % Construct a 3-by-3 2-D affine transformation matrix A
159 % that maps the three points in X to the three points in U.
160 U = varargin{1};
161 X = varargin{2};
162 A = construct_matrix( U, X, 'affine' );
163 A(:,3) = [0 0 1]'; % Clean up noise before validating A.
1721 164 else
1721 165 A = varargin{1};
1721 166 end
0.40 1721 167 A = validate_matrix( A, 'affine' );
168
1721 169 N = size(A,2) - 1;
0.02 1721 170 tdata.T = A;
0.10 1721 171 tdata.Tinv = inv(A);
172
173 % In case of numerical noise, coerce the inverse into the proper form.
0.02 1721 174 tdata.Tinv(1:end-1,end) = 0;
0.02 1721 175 tdata.Tinv(end,end) = 1;
176
0.18 1721 177 t = assigntform(N, N, @fwd_affine, @inv_affine, tdata);

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