This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
37 | B=A+ones(size(A,1),1)*x; | 1222912 | 18.345 s | 44.3% |  |
30 | if length(x(:))==1 | 1222912 | 7.661 s | 18.5% |  |
38 | end | 1222912 | 4.146 s | 10.0% |  |
32 | else | 1222912 | 3.765 s | 9.1% |  |
34 | if(size(A,2)~=size(x,2)) | 1222912 | 3.585 s | 8.7% |  |
All other lines | | | 3.875 s | 9.4% |  |
Totals | | | 41.377 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 38 |
Non-code lines (comments, blank lines) | 30 |
Code lines (lines that can run) | 8 |
Code lines that did run | 5 |
Code lines that did not run | 3 |
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