This is a static copy of a profile report

Home

images/private/conn2array (1721 calls, 0.030 sec)
Generated 05-Nov-2014 07:53:17 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/private/conn2array.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imclearborderfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
18
array = [0 1 0; 1 1 1; 0 1 0];
17210 s0%
17
if isequal(conn,4)
17210 s0%
15
error(nargchk(1,1,nargin,'stru...
17210 s0%
All other lines  0.030 s100.0%
Totals  0.030 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function35
Non-code lines (comments, blank lines)21
Code lines (lines that can run)14
Code lines that did run3
Code lines that did not run11
Coverage (did run/can run)21.43 %
Function listing
   time   calls  line
1 function array = conn2array(conn)
2 %CONN2ARRAY Convert connectivity to array form.
3 % ARRAY = CONN2ARRAY(CONN) converts CONN to its array form if CONN is
4 % one of the shortcut specifiers (4, 8, 6, 18, or 26). Otherwise ARRAY
5 % is the same as CONN.
6 %
7 % If CONN is not one of the shortcut specifiers, CONN2ARRAY does not
8 % check to make sure that CONN is a valid connectivity array.
9 %
10 % See also CONNDEF.
11
12 % Copyright 1993-2003 The MathWorks, Inc.
13 % $Revision: 1.4.4.2 $ $Date: 2003/08/01 18:10:18 $
14
1721 15 error(nargchk(1,1,nargin,'struct'))
16
1721 17 if isequal(conn,4)
1721 18 array = [0 1 0; 1 1 1; 0 1 0];
19
20 elseif isequal(conn,8)
21 array = ones(3,3);
22
23 elseif isequal(conn,6)
24 array = conndef(3,'minimal');
25
26 elseif isequal(conn,18)
27 array = cat(3,[0 1 0; 1 1 1; 0 1 0], ...
28 ones(3,3), [0 1 0; 1 1 1; 0 1 0]);
29
30 elseif isequal(conn,26)
31 array = ones(3,3,3);
32
33 else
34 array = conn;
35 end