This is a static copy of a profile report

Home

parseparams (Calls: 2, Time: 0.006 s)
Generated 16-Jul-2020 17:08:38 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/parseparams.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
surffunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
charsrch=[charsrch matlab.grap...
60.002 s38.9%
21
end
60.001 s17.1%
19
for i=1:length(args)
20.001 s10.0%
27
proppairs=args(1:0);
20.000 s7.3%
25
if isempty(charindx)
20.000 s4.8%
All other lines  0.001 s21.9%
Totals  0.006 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isCharOrStringfunction60.000 s0.9%
Self time (built-ins, overhead, etc.)  0.006 s99.1%
Totals  0.006 s100% 
Code Analyzer results
Line numberMessage
20The variable 'charsrch' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
Show coverage for parent directory
Total lines in function31
Non-code lines (comments, blank lines)19
Code lines (lines that can run)12
Code lines that did run9
Code lines that did not run3
Coverage (did run/can run)75.00 %
Function listing
time 
Calls 
 line
   1 
function [regargs, proppairs]=parseparams(args)
   2 
%PARSEPARAMS Finds first string argument.
   3 
%   [REG, PROP]=PARSEPARAMS(ARGS) takes cell array ARGS and
   4 
%   separates it into two argument sets:
   5 
%      REG being all arguments up to, but excluding, the
   6 
%   first string argument encountered in ARGS.
   7 
%      PROP contains all other arguments after, and including,
   8 
%   the first string argument encountered.
   9 
%
  10 
%   PARSEPARAMS is intended to isolate possible property
  11 
%   value pairs in functions using VARARGIN as the input
  12 
%   argument.
  13 

  14 
%   Chris Portal 2-17-98
  15 
%   Copyright 1984-2017 The MathWorks, Inc. 
  16 

< 0.001 
      2 
  17
charsrch=[]; 
  18 

< 0.001 
      2 
  19
for i=1:length(args) 
  0.002 
      6 
  20
   charsrch=[charsrch matlab.graphics.internal.isCharOrString(args{i})]; 
  0.001 
      6 
  21
end 
  22 

< 0.001 
      2 
  23
charindx=find(charsrch); 
  24 

< 0.001 
      2 
  25
if isempty(charindx) 
< 0.001 
      2 
  26
   regargs=args; 
< 0.001 
      2 
  27
   proppairs=args(1:0); 
  28 
else
  29 
   regargs=args(1:charindx(1)-1);
  30 
   proppairs=args(charindx(1):end);
< 0.001 
      2 
  31
end 

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