This is a static copy of a profile report

Home

squeeze (Calls: 2555, Time: 0.045 s)
Generated 16-Jul-2020 17:09:44 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/elmat/squeeze.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
hhsave_VFI_3OCfunction2555
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
23
siz = [siz ones(1,2-length(siz...
25550.017 s37.3%
22
siz(siz==1) = []; % Remove sin...
25550.011 s23.2%
24
b = reshape(a,siz);
25550.004 s8.3%
21
siz = size(a);
25550.003 s6.4%
27
end
25550.002 s5.3%
All other lines  0.009 s19.6%
Totals  0.045 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function27
Non-code lines (comments, blank lines)16
Code lines (lines that can run)11
Code lines that did run8
Code lines that did not run3
Coverage (did run/can run)72.73 %
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 

< 0.001 
   2555 
  16
if nargin==0  
  17 
  error(message('MATLAB:squeeze:NotEnoughInputs')); 
< 0.001 
   2555 
  18
end 
  19 

< 0.001 
   2555 
  20
if ~ismatrix(a) 
  0.003 
   2555 
  21
  siz = size(a); 
  0.011 
   2555 
  22
  siz(siz==1) = []; % Remove singleton dimensions. 
  0.017 
   2555 
  23
  siz = [siz ones(1,2-length(siz))]; % Make sure siz is at least 2-D 
  0.004 
   2555 
  24
  b = reshape(a,siz); 
  25 
else
  26 
  b = a;
  0.002 
   2555 
  27
end 

Other subfunctions in this file are not included in this listing.