This is a static copy of a profile reportHome
squeeze (84677 calls, 7.911 sec)
Generated 05-Nov-2014 07:52:41 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/elmat/squeeze.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 |
21 | if ~ismatrix(a) | 84677 | 1.702 s | 21.5% |  |
23 | siz(siz==1) = []; % Remove sin... | 84677 | 1.422 s | 18.0% |  |
24 | siz = [siz ones(1,2-length(siz... | 84677 | 1.392 s | 17.6% |  |
25 | b = reshape(a,siz); | 84677 | 1.021 s | 12.9% |  |
22 | siz = size(a); | 84677 | 0.661 s | 8.4% |  |
All other lines | | | 1.712 s | 21.6% |  |
Totals | | | 7.911 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 28 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 11 |
Code lines that did run | 6 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 54.55 % |
Function listing
time calls line
1 function b = squeeze(a)
2 %SQUEEZE Remove singleton dimensions.
3 % B = SQUEEZE(A) returns an array B with the same elements as
4 % A but with all the singleton dimensions removed. A singleton
5 % is a dimension such that size(A,dim)==1. 2-D arrays are
6 % unaffected by squeeze so that row vectors remain rows.
7 %
8 % For example,
9 % squeeze(rand(2,1,3))
10 % is 2-by-3.
11 %
12 % See also SHIFTDIM.
13
14 % Copyright 1984-2010 The MathWorks, Inc.
15 % $Revision: 1.14.4.3 $ $Date: 2010/08/23 23:08:14 $
16
0.53 84677 17 if nargin==0
18 error(message('MATLAB:squeeze:NotEnoughInputs'));
19 end
20
1.70 84677 21 if ~ismatrix(a)
0.66 84677 22 siz = size(a);
1.42 84677 23 siz(siz==1) = []; % Remove singleton dimensions.
1.39 84677 24 siz = [siz ones(1,2-length(siz))]; % Make sure siz is at least 2-D
1.02 84677 25 b = reshape(a,siz);
26 else
27 b = a;
28 end