This is a static copy of a profile report

Home

isMatchingSize (Calls: 4, Time: 0.001 s)
Generated 18-May-2021 16:05:26 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/lang/+matlab/+lang/+internal/isMatchingSize.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...lper>ValidationHelper.validateSizeclass method4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
28
end
80.000 s22.7%
29
for i=numel(arraySize)+1:numel...
40.000 s14.4%
22
if sz(i) ~= -1 && arra...
80.000 s12.9%
21
for i=1:numel(arraySize)
40.000 s12.4%
40
end
40.000 s0.3%
All other lines  0.000 s37.4%
Totals  0.001 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function40
Non-code lines (comments, blank lines)18
Code lines (lines that can run)22
Code lines that did run11
Code lines that did not run11
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
   1 
function tf = isMatchingSize(arraySize, sz)
   2 
%MATLAB.LANG.INTERNAL.ISMATCHINGSIZE Compares array size with specified size.
   3 
%   tf = MATLAB.LANG.INTERNAL.ISMATCHINGSIZE(A,B) compares size vectors A
   4 
%   and B. A is normally the result of calling function size on an array. B
   5 
%   is a coded size vector where value -1 represents unrestricted dimension
   6 
%   length that matches any demension length. The function returnes scalar
   7 
%   logic value true if all respective element values from the vectors
   8 
%   match. Trailing values of 1 from B are ignored.
   9 

  10 
%   Copyright 2019 The MathWorks, Inc.
  11 

< 0.001 
      4 
  12
if ~isvector(arraySize) 
  13 
    tf = false;
  14 
    return;
      4 
  15
end 
< 0.001 
      4 
  16
if numel(sz) < numel(arraySize) 
  17 
    % size(array) = [1,2,3], sz = [1,2]
  18 
    tf = false;
  19 
    return;
      4 
  20
end 
< 0.001 
      4 
  21
for i=1:numel(arraySize) 
< 0.001 
      8 
  22
    if sz(i) ~= -1 && arraySize(i) ~= sz(i) 
  23 
        % size(array) = [m,n], sz = [m,xn]
  24 
        % size(array) = [m,n], sz = [:,xn]
  25 
        tf = false;
  26 
        return;
      8 
  27
    end 
< 0.001 
      8 
  28
end 
< 0.001 
      4 
  29
for i=numel(arraySize)+1:numel(sz) 
  30 
    if sz(i) ~= -1 && sz(i) ~= 1
  31 
        % size(array) = [1,2], sz = [1,2,3]
  32 
        tf = false;
  33 
        return;
  34 
    end
  35 
end
  36 
% size(array) = [m,n], sz = [m,n]
  37 
% size(array) = [m,n], sz = [m,-1]
  38 
% size(array) = [m,n], sz = [m,n,1]
      4 
  39
tf = true; 
< 0.001 
      4 
  40
end 

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