This is a static copy of a profile report

Home

graph2d/private/subplot_parseargs (Calls: 4, Time: 0.016 s)
Generated 18-May-2021 16:05:22 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/graph2d/private/subplot_parseargs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
subplotfunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
if numel(args)>=1 &&...
40.006 s39.0%
24
args = convertStringToCharArgs...
40.004 s23.8%
28
firststr = find([cellfun(@isch...
40.003 s17.3%
31
strargs = args(firststr:end);
40.002 s12.7%
32
args = args(1:firststr-1);
40.001 s6.4%
All other lines  0.000 s0.7%
Totals  0.016 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
convertStringToCharArgsfunction40.001 s5.1%
isCharOrStringfunction40.000 s2.0%
Self time (built-ins, overhead, etc.)  0.015 s92.9%
Totals  0.016 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function35
Non-code lines (comments, blank lines)21
Code lines (lines that can run)14
Code lines that did run8
Code lines that did not run6
Coverage (did run/can run)57.14 %
Function listing
time 
Calls 
 line
   1 
function [args,strargs,narg] = subplot_parseargs(args)
   2 
% Helper function used by subplot for separating out name/value pairs and
   3 
% string arguments from other arguments. entries out of the pvpair list.
   4 
% Note that the arguments may include a three digit string as the first
   5 
% input argument, which represents 'mnp'. That will be separated out into
   6 
% three separate numeric input arguments for [m, n, p].
   7 

   8 
% Copyright 2015-2017 The MathWorks, Inc.
   9 

  10 
% Check if the first input argument is a string representing 'mnp'
  11 
% If so, convert it to three separate numeric inputs.
  12 

  13 
import matlab.graphics.internal.*;
  0.006 
      4 
  14
if numel(args)>=1 && isCharOrString(args{1}) ... % it is a string 
  15 
        && numel(args{1})==3 ... % it has three characters
  16 
        && all(args{1} >= '0' & args{1} <= '9') % characters are between 0-9
  17 

  18 
    args = [{str2double(args{1}(1)) ,... % first character
  19 
             str2double(args{1}(2)) ,... % second character
  20 
             str2double(args{1}(3))},... % third character
  21 
             args(2:end)];
< 0.001 
      4 
  22
end 
  23 

  0.004 
      4 
  24
args = convertStringToCharArgs(args); 
  25 

  26 
% Find the first string input.
  27 
% (append true so that firststr is never empty)
  0.003 
      4 
  28
firststr = find([cellfun(@ischar,args), true],1); 
  29 

  30 
% Split the arguments at the first string input.
  0.002 
      4 
  31
strargs = args(firststr:end); 
  0.001 
      4 
  32
args = args(1:firststr-1); 
< 0.001 
      4 
  33
narg = numel(args); 
  34 

< 0.001 
      4 
  35
end 

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