This is a static copy of a profile report

Home

parseparams (37 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:13 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/parseparams.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...areaHGUsingMATLABClasses>parseargssubfunction37
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
31
end
370 s0%
30
proppairs=args(charindx(1):end...
370 s0%
29
regargs=args(1:charindx(1)-1);
370 s0%
28
else
370 s0%
25
if isempty(charindx),
370 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
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 run10
Code lines that did not run2
Coverage (did run/can run)83.33 %
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-2002 The MathWorks, Inc. 
  16 

     37 
  17 
charsrch=[]; 
  18 

     37 
  19 
for i=1:length(args), 
    222 
  20 
   charsrch=[charsrch ischar(args{i})]; 
    222 
  21 
end 
  22 

     37 
  23 
charindx=find(charsrch); 
  24 

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