This is a static copy of a profile reportHome
cell.strmatch (6993 calls, 3.049 sec)
Generated 05-Aug-2011 13:00:27 using cpu time.
function in file /usr/local/MATLAB/R2011a/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); | 6920 | 2.077 s | 68.1% |  |
18 | if iscellstr(strs), strs = cha... | 6993 | 0.634 s | 20.8% |  |
17 | if iscellstr(str), str = char(... | 6993 | 0.131 s | 4.3% |  |
16 | if isempty(strs), out = []; re... | 6993 | 0.066 s | 2.2% |  |
30 | out = strmatch(str,strs,flag); | 73 | 0.044 s | 1.4% |  |
All other lines | | | 0.098 s | 3.2% |  |
Totals | | | 3.049 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
strmatch | function | 6993 | 2.044 s | 67.0% |  |
iscellstr | function | 13986 | 0.448 s | 14.7% |  |
Self time (built-ins, overhead, etc.) | | | 0.557 s | 18.3% |  |
Totals | | | 3.049 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.6 $
12
6993 13 if nargin < 2 || nargin > 3
14 error(nargchk(2,3,nargin,'struct'));
15 end
0.07 6993 16 if isempty(strs), out = []; return; end
0.13 6993 17 if iscellstr(str), str = char(str); end
0.63 6993 18 if iscellstr(strs), strs = char(strs); end
19
0.01 6993 20 if ~ischar(str) || ~ischar(strs)
21 error('MATLAB:strmatch:InvalidInput','Requires character array or cell array of strings as inputs.')
22 end
0.02 6993 23 if (nargin==3) && ~ischar(flag)
24 error('MATLAB:strmatch:InvalidInput','FLAG must be a string.');
25 end
26
0.01 6993 27 if nargin==2,
2.08 6920 28 out = strmatch(str,strs);
73 29 else
0.04 73 30 out = strmatch(str,strs,flag);
73 31 end
Other subfunctions in this file are not included in this listing.