This is a static copy of a profile reportHome
cell.strmatch (32774 calls, 10.394 sec)
Generated 05-Nov-2014 07:52:32 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/strfun/@cell/strmatch.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
28 | out = strmatch(str,strs); | 31053 | 5.027 s | 48.4% |  |
18 | if iscellstr(strs), strs = cha... | 32774 | 2.113 s | 20.3% |  |
17 | if iscellstr(str), str = char(... | 32774 | 1.542 s | 14.8% |  |
30 | out = strmatch(str,strs,flag); | 1721 | 0.551 s | 5.3% |  |
16 | if isempty(strs), out = []; re... | 32774 | 0.280 s | 2.7% |  |
All other lines | | | 0.881 s | 8.5% |  |
Totals | | | 10.394 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
strmatch | function | 32774 | 5.157 s | 49.6% |  |
iscellstr | function | 65548 | 2.634 s | 25.3% |  |
Self time (built-ins, overhead, etc.) | | | 2.604 s | 25.0% |  |
Totals | | | 10.394 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 31 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 17 |
Code lines that did run | 11 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 64.71 % |
Function listing
time calls line
1 function out = strmatch(str,strs,flag)
2 %STRMATCH Cell array based string matching.
3 % Implementation of STRMATCH for cell arrays of strings.
4 %
5 % STRMATCH will be removed in a future release. Use STRNCMP instead.
6 %
7 % See also STRMATCH.
8
9 % Loren Dean 9/19/95
10 % Copyright 1984-2009 The MathWorks, Inc.
11 % $Revision: 1.15.4.7 $
12
0.10 32774 13 if nargin < 2 || nargin > 3
14 error(nargchk(2,3,nargin,'struct'));
15 end
0.28 32774 16 if isempty(strs), out = []; return; end
1.54 32774 17 if iscellstr(str), str = char(str); end
2.11 32774 18 if iscellstr(strs), strs = char(strs); end
19
0.16 32774 20 if ~ischar(str) || ~ischar(strs)
21 error(message('MATLAB:strmatch:InvalidInput'));
22 end
0.07 32774 23 if (nargin==3) && ~ischar(flag)
24 error(message('MATLAB:strmatch:InvalidFlagInput'));
25 end
26
0.09 32774 27 if nargin==2,
5.03 31053 28 out = strmatch(str,strs);
0.01 1721 29 else
0.55 1721 30 out = strmatch(str,strs,flag);
1721 31 end
Other subfunctions in this file are not included in this listing.