This is a static copy of a profile report

Home

ml_getlinept2 (2180746 calls, 13822.469 sec)
Generated 05-Nov-2014 07:53:54 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/2D/tztoolbox/ml_getlinept2.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ml_parsecell>updates2subfunction2180520
ml_setimglnpixel2function226
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
62
pts=ml_getlinept(s,t);
218074613594.814 s98.4%
38
if ~exist('isend','var')
218074642.008 s0.3%
56
t=round([s(1)+cos(ra)*len,s(2)...
215651618.696 s0.1%
34
if nargin < 3
218074613.218 s0.1%
39
isend=0;
218074613.018 s0.1%
All other lines  140.715 s1.0%
Totals  13822.469 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ml_getlineptfunction218074613568.678 s98.2%
Self time (built-ins, overhead, etc.)  253.791 s1.8%
Totals  13822.469 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function63
Non-code lines (comments, blank lines)37
Code lines (lines that can run)26
Code lines that did run23
Code lines that did not run3
Coverage (did run/can run)88.46 %
Function listing
   time   calls  line
1 function pts=ml_getlinept2(s,a,len,isend)
2 %ML_GETLINEPT2 Get coordinates of points on a line segment.
3 % ML_GETLINEPT2(S,A,LEN) returns coordinates of points on a line segment
4 % with starting point S, angle A and length LEN.
5 %
6 % ML_GETLINEPT2(S,A,LEN,ISEND) only returns the two ends of the line
7 % segment if ISEND is 1. Otherwise, it is the same as
8 % ML_GETLINEPT2(S,A,LEN).
9
10 % ??-???-???? Initial write T. Zhao
11 % Copyright (c) Murphy Lab, Carnegie Mellon University
12
13 % Copyright (C) 2007 Murphy Lab
14 % Carnegie Mellon University
15 %
16 % This program is free software; you can redistribute it and/or modify
17 % it under the terms of the GNU General Public License as published
18 % by the Free Software Foundation; either version 2 of the License,
19 % or (at your option) any later version.
20 %
21 % This program is distributed in the hope that it will be useful, but
22 % WITHOUT ANY WARRANTY; without even the implied warranty of
23 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 % General Public License for more details.
25 %
26 % You should have received a copy of the GNU General Public License
27 % along with this program; if not, write to the Free Software
28 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29 % 02110-1301, USA.
30 %
31 % For additional information visit http://murphylab.web.cmu.edu or
32 % send email to murphy@cmu.edu
33
13.22 2180746 34 if nargin < 3
35 error('3 or 4 arguments are required');
36 end
37
42.01 2180746 38 if ~exist('isend','var')
13.02 2180746 39 isend=0;
11.87 2180746 40 end
41
7.91 2180746 42 a=mod(a,360);
6.70 2180746 43 len=round(len);
44
6.62 2180746 45 switch a
6.93 2180746 46 case 0
0.04 6057 47 t=[s(1)+len,s(2)];
6.67 2174689 48 case 90
0.05 6057 49 t=[s(1),s(2)+len];
6.72 2168632 50 case 180
0.02 6057 51 t=[s(1)-len,s(2)];
6.77 2162575 52 case 270
0.01 6059 53 t=[s(1),s(2)-len];
6.65 2156516 54 otherwise
6.71 2156516 55 ra=a*pi/180;
18.70 2156516 56 t=round([s(1)+cos(ra)*len,s(2)+sin(ra)*len]);
7.57 2156516 57 end
58
6.97 2180746 59 if isend
60 pts=[s;t];
6.52 2180746 61 else
13594.81 2180746 62 pts=ml_getlinept(s,t);
12.98 2180746 63 end