This is a static copy of a profile reportHome
ml_shift (1216653 calls, 304.151 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_shift.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 |
41 | y = circshift(x,offset); | 1216653 | 267.380 s | 87.9% |  |
38 | offset = [offset offset]; | 1216653 | 9.423 s | 3.1% |  |
37 | if length(offset)==1 | 1216653 | 6.679 s | 2.2% |  |
33 | if nargin < 2 | 1216653 | 4.056 s | 1.3% |  |
39 | end | 1216653 | 3.635 s | 1.2% |  |
All other lines | | | 12.978 s | 4.3% |  |
Totals | | | 304.151 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
circshift | function | 1216653 | 252.830 s | 83.1% |  |
Self time (built-ins, overhead, etc.) | | | 51.321 s | 16.9% |  |
Totals | | | 304.151 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 41 |
Non-code lines (comments, blank lines) | 34 |
Code lines (lines that can run) | 7 |
Code lines that did run | 5 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 71.43 % |
Function listing
time calls line
1 function y = ml_shift(x,offset)
2 %ML_SHIFT Circular shift of a matrix.
3 % Y = ML_SHIFT(X,OFFSET) return a circularly shifted matrix of X. OFFSET is a
4 % scalar of 1x2 vector. If it is a scalar, both dimensions will be shifted by
5 % OFFSET. If it is a 1x2 vector, OFFSET(1) is for rows and OFFSET(2) is for
6 % columns. The direction is left and down.
7 %
8 % See also
9
10 % 10-Sep-2006 Initial write T. Zhao
11 % Copyright (c) 2006 Murphy Lab
12 % Carnegie Mellon University
13 %
14 % This program is free software; you can redistribute it and/or modify
15 % it under the terms of the GNU General Public License as published
16 % by the Free Software Foundation; either version 2 of the License,
17 % or (at your option) any later version.
18 %
19 % This program is distributed in the hope that it will be useful, but
20 % WITHOUT ANY WARRANTY; without even the implied warranty of
21 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 % General Public License for more details.
23 %
24 % You should have received a copy of the GNU General Public License
25 % along with this program; if not, write to the Free Software
26 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 % 02110-1301, USA.
28 %
29 % For additional information visit http://murphylab.web.cmu.edu or
30 % send email to murphy@cmu.edu
31
32
4.06 1216653 33 if nargin < 2
34 error('Exactly 2 arguments are required');
35 end
36
6.68 1216653 37 if length(offset)==1
9.42 1216653 38 offset = [offset offset];
3.64 1216653 39 end
40
267.38 1216653 41 y = circshift(x,offset);