This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
872 | se = strel; | 808 | 2.443 s | 87.5% |  |
882 | idx = sub2ind([M N], r + max(a... | 808 | 0.140 s | 5.0% |  |
875 | pp = repmat(p,1,2); | 808 | 0.080 s | 2.9% |  |
881 | se.nhood = false(M,N); | 808 | 0.040 s | 1.4% |  |
883 | se.nhood(idx) = 1; | 808 | 0.020 s | 0.7% |  |
All other lines | | | 0.070 s | 2.5% |  |
Totals | | | 2.794 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
strel>strel.strel | subfunction | 808 | 2.433 s | 87.1% |  |
sub2ind | function | 808 | 0.120 s | 4.3% |  |
repmat | function | 808 | 0.070 s | 2.5% |  |
Self time (built-ins, overhead, etc.) | | | 0.170 s | 6.1% |  |
Totals | | | 2.794 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 16 |
Non-code lines (comments, blank lines) | 2 |
Code lines (lines that can run) | 14 |
Code lines that did run | 14 |
Code lines that did not run | 0 |
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.