This is a static copy of a profile report

Home

maketform>trans_affine (3442 calls, 3.875 sec)
Generated 05-Nov-2014 07:53:09 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>fwd_affinesubfunction1721
maketform>inv_affinesubfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
220
U1 = X1 * M;                  ...
34421.873 s48.3%
219
X1 = [X ones(size(X,1),1)];   ...
34421.582 s40.8%
221
U  = U1(:,1:end-1);           ...
34420.310 s8.0%
211
if strcmp(direction,'forward')
34420.040 s1.0%
213
elseif strcmp(direction,'inver...
17210.030 s0.8%
All other lines  0.040 s1.0%
Totals  3.875 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function19
Non-code lines (comments, blank lines)9
Code lines (lines that can run)10
Code lines that did run7
Code lines that did not run3
Coverage (did run/can run)70.00 %
Function listing
   time   calls  line
203 function U = trans_affine( X, t, direction )
204
205 % Forward/inverse affine transformation method
206 %
207 % T is an affine transformation structure. X is the row vector to
208 % be transformed, or a matrix with a vector in each row.
209 % DIRECTION is either 'forward' or 'inverse'.
210
0.04 3442 211 if strcmp(direction,'forward')
1721 212 M = t.tdata.T;
0.03 1721 213 elseif strcmp(direction,'inverse')
1721 214 M = t.tdata.Tinv;
215 else
216 error(message('images:maketform:invalidDirection'))
217 end
218
1.58 3442 219 X1 = [X ones(size(X,1),1)]; % Convert X to homogeneous coordinates
1.87 3442 220 U1 = X1 * M; % Transform in homogeneous coordinates
0.31 3442 221 U = U1(:,1:end-1); % Convert homogeneous coordinates to U

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