This is a static copy of a profile report

Home

ml_addrow (1222912 calls, 41.377 sec)
Generated 05-Nov-2014 07:52:57 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/ml_addrow.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ml_moment2function202
ml_tracecontourfunction1216653
ml_parsecell>updates2subfunction6057
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
37
B=A+ones(size(A,1),1)*x;
122291218.345 s44.3%
30
if length(x(:))==1
12229127.661 s18.5%
38
end
12229124.146 s10.0%
32
else
12229123.765 s9.1%
34
if(size(A,2)~=size(x,2))
12229123.585 s8.7%
All other lines  3.875 s9.4%
Totals  41.377 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function38
Non-code lines (comments, blank lines)30
Code lines (lines that can run)8
Code lines that did run5
Code lines that did not run3
Coverage (did run/can run)62.50 %
Function listing
   time   calls  line
1 function B=ml_addrow(A,x)
2
3 %ML_ADDROW add the same vector to each row of a matrix
4 % B=ML_ADDROW(A,X) adds the vector X to each row of A and
5 % returns the sum. A and X must have the same number of
6 % columns if X is not a scalar.
7
8 % Copyright (C) 2006 Murphy Lab
9 % Carnegie Mellon University
10 %
11 % This program is free software; you can redistribute it and/or modify
12 % it under the terms of the GNU General Public License as published
13 % by the Free Software Foundation; either version 2 of the License,
14 % or (at your option) any later version.
15 %
16 % This program is distributed in the hope that it will be useful, but
17 % WITHOUT ANY WARRANTY; without even the implied warranty of
18 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 % General Public License for more details.
20 %
21 % You should have received a copy of the GNU General Public License
22 % along with this program; if not, write to the Free Software
23 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 % 02110-1301, USA.
25 %
26 % For additional information visit http://murphylab.web.cmu.edu or
27 % send email to murphy@cmu.edu
28
29
7.66 1222912 30 if length(x(:))==1
31 B = A+x;
3.77 1222912 32 else
33
3.58 1222912 34 if(size(A,2)~=size(x,2))
35 error('The matrix and the vector must have the same number of columns');
36 end
18.35 1222912 37 B=A+ones(size(A,1),1)*x;
4.15 1222912 38 end