This is a static copy of a profile report

Home

parenReference_2D (Calls: 139394, Time: 0.348 s)
Generated 04-Jun-2021 04:11:11 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\shared\matlab_datatypes\+matlab\+internal\+datatypes\parenReference_2D.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
categorical.parenReferencefunction139394
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
17
data = data(rowIndices,colIndi...
1393940.161 s46.2%
18
end
1393940.021 s6.0%
14
if optimizeColon
1393940.007 s2.0%
10
optimizeColon = ischar(rowIndi...
1393940.007 s1.9%
16
else
1393940.007 s1.9%
All other lines  0.146 s42.0%
Totals  0.348 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function18
Non-code lines (comments, blank lines)10
Code lines (lines that can run)8
Code lines that did run5
Code lines that did not run3
Coverage (did run/can run)62.50 %
Function listing
time 
Calls 
 line
   1 
function data = parenReference_2D(data,rowIndices,colIndices)
   2 
%PARENREFERENCE_2D Subscripting helper for 2D paren reference.
   3 
%   DATA = PARENREFERENCE_2D(DATA,ROWINDICES) returns the specified
   4 
%   rows from a matrix, i.e. DATA(ROWINDICES,:). PARENREFERENCE_2D
   5 
%   has an optimized special case when ROWINDICES IS ':'.
   6 

   7 
%   Copyright 2019-2020 The MathWorks, Inc.
   8 

   9 
% inline matlab.internal.datatypes.isColon for both rowIndices & colIndices
  0.007 
 139394 
  10
optimizeColon = ischar(rowIndices) && ischar(colIndices) && ... 
  11 
                isscalar(rowIndices) && isscalar(colIndices) && ...
  12 
                (rowIndices == ':') && (colIndices == ':');
  13 
            
  0.007 
 139394 
  14
if optimizeColon 
  15 
    data = matlab.internal.datatypes.matricize(data);
  0.007 
 139394 
  16
else 
  0.161 
 139394 
  17
    data = data(rowIndices,colIndices); 
  0.021 
 139394 
  18
end