This is a static copy of a profile reportHome
ml_wmoment (404 calls, 0.110 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_wmoment.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 |
38 | m=sum((x-mu).^order.*ws)/sum(w... | 202 | 0.080 s | 72.7% |  |
37 | mu=ml_wmoment(x,ws,1); | 202 | 0 s | 0% |  |
34 | return | 202 | 0 s | 0% |  |
33 | m=sum(x.*ws)/sum(ws); | 202 | 0 s | 0% |  |
32 | if order==1 | 404 | 0 s | 0% |  |
All other lines | | | 0.030 s | 27.3% |  |
Totals | | | 0.110 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
ml_wmoment | function | 202 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.110 s | 100.0% |  |
Totals | | | 0.110 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 38 |
Non-code lines (comments, blank lines) | 32 |
Code lines (lines that can run) | 6 |
Code lines that did run | 5 |
Code lines that did not run | 1 |
Coverage (did run/can run) | 83.33 % |
Function listing
time calls line
1 function m = ml_wmoment(x,ws,order)
2
3 %ML_WMOMENT calculates weighted central moments
4 % M=ML_WMOMENT(X,WS,ORDER) the central moment of X specified by the
5 % ORDER. WS is the weights. Both X and WS must be a vector and have the
6 % same size. However, The first order will return moment, the mean,
7 % rather than the central moment.
8
9 % 24-Apr-2005 Initial write TINGZ
10 % Copyright (C) 2006 Murphy Lab
11 % Carnegie Mellon University
12 %
13 % This program is free software; you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published
15 % by the Free Software Foundation; either version 2 of the License,
16 % or (at your option) any later version.
17 %
18 % This program is distributed in the hope that it will be useful, but
19 % WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 % General Public License for more details.
22 %
23 % You should have received a copy of the GNU General Public License
24 % along with this program; if not, write to the Free Software
25 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 % 02110-1301, USA.
27 %
28 % For additional information visit http://murphylab.web.cmu.edu or
29 % send email to murphy@cmu.edu
30
31
404 32 if order==1
202 33 m=sum(x.*ws)/sum(ws);
202 34 return
35 end
36
202 37 mu=ml_wmoment(x,ws,1);
0.08 202 38 m=sum((x-mu).^order.*ws)/sum(ws);