This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
finfofunction4
graphics/.../inputcheck>LocalCheckOptionsubfunction40
ismethodfunction51
cutObsfunction18
optimsetfunction6880
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
28
out = strmatch(str,strs);
69202.077 s68.1%
18
if iscellstr(strs), strs = cha...
69930.634 s20.8%
17
if iscellstr(str), str = char(...
69930.131 s4.3%
16
if isempty(strs), out = []; re...
69930.066 s2.2%
30
out = strmatch(str,strs,flag);
730.044 s1.4%
All other lines  0.098 s3.2%
Totals  3.049 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strmatchfunction69932.044 s67.0%
iscellstrfunction139860.448 s14.7%
Self time (built-ins, overhead, etc.)  0.557 s18.3%
Totals  3.049 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function31
Non-code lines (comments, blank lines)14
Code lines (lines that can run)17
Code lines that did run11
Code lines that did not run6
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.