This is a static copy of a profile report

Home

strel>MakePeriodicLineStrel (808 calls, 2.794 sec)
Generated 05-Nov-2014 07:52:40 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/strel.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
strel>strel.strelsubfunction808
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
872
se = strel;
8082.443 s87.5%
882
idx = sub2ind([M N], r + max(a...
8080.140 s5.0%
875
pp = repmat(p,1,2);
8080.080 s2.9%
881
se.nhood = false(M,N);
8080.040 s1.4%
883
se.nhood(idx) = 1;
8080.020 s0.7%
All other lines  0.070 s2.5%
Totals  2.794 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.strelsubfunction8082.433 s87.1%
sub2indfunction8080.120 s4.3%
repmatfunction8080.070 s2.5%
Self time (built-ins, overhead, etc.)  0.170 s6.1%
Totals  2.794 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function16
Non-code lines (comments, blank lines)2
Code lines (lines that can run)14
Code lines that did run14
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
871 function se = MakePeriodicLineStrel(p,v)
2.44 808 872 se = strel;
0.01 808 873 v = v(:)';
0.01 808 874 p = (-p:p)';
0.08 808 875 pp = repmat(p,1,2);
0.01 808 876 rc = bsxfun(@times, pp, v);
0.02 808 877 r = rc(:,1);
808 878 c = rc(:,2);
808 879 M = 2*max(abs(r)) + 1;
0.01 808 880 N = 2*max(abs(c)) + 1;
0.04 808 881 se.nhood = false(M,N);
0.14 808 882 idx = sub2ind([M N], r + max(abs(r)) + 1, c + max(abs(c)) + 1);
0.02 808 883 se.nhood(idx) = 1;
808 884 se.height = zeros(M,N);
885
808 886 end

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