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
Function Name | Function Type | Calls |
surf | function | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
20 | charsrch=[charsrch matlab.grap... | 6 | 0.002 s | 38.9% | |
21 | end | 6 | 0.001 s | 17.1% | |
19 | for i=1:length(args) | 2 | 0.001 s | 10.0% | |
27 | proppairs=args(1:0); | 2 | 0.000 s | 7.3% | |
25 | if isempty(charindx) | 2 | 0.000 s | 4.8% | |
All other lines | 0.001 s | 21.9% | |||
Totals | 0.006 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isCharOrString | function | 6 | 0.000 s | 0.9% | |
Self time (built-ins, overhead, etc.) | 0.006 s | 99.1% | |||
Totals | 0.006 s | 100% |
Line number | Message |
20 | The variable 'charsrch' appears to change size on every loop iteration. Consider preallocating for speed. |
Total lines in function | 31 |
Non-code lines (comments, blank lines) | 19 |
Code lines (lines that can run) | 12 |
Code lines that did run | 9 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 75.00 % |
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.