This is a static copy of a profile report

Home

strread (2040 calls, 0.300 sec)
Generated 05-Nov-2014 07:52:33 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/strfun/strread.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ml_lsfunction1636
chunk_startfunction404
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
51
[varargout{1:nlhs}]=dataread('...
20200.190 s63.3%
47
nlhs = nargout;
20400.030 s10.0%
50
if  num < 4095 % 4095 is da...
20400.020 s6.7%
49
num = numel(varargin{1});
20400.020 s6.7%
58
end
200.010 s3.3%
All other lines  0.030 s10.0%
Totals  0.300 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
datareadMEX-file20400.080 s26.7%
Self time (built-ins, overhead, etc.)  0.220 s73.3%
Totals  0.300 s100% 
Code Analyzer results
Line numberMessage
51DATAREAD will be removed in a future release. Use TEXTSCAN instead.
55DATAREAD will be removed in a future release. Use TEXTSCAN instead.
57DATAREAD will be removed in a future release. Use TEXTSCAN instead.
Coverage results
[ Show coverage for parent directory ]
Total lines in function59
Non-code lines (comments, blank lines)41
Code lines (lines that can run)18
Code lines that did run14
Code lines that did not run4
Coverage (did run/can run)77.78 %
Function listing
   time   calls  line
1 function varargout = strread(varargin)
2 %STRREAD Read formatted data from string.
3 % A = STRREAD('STRING')
4 % A = STRREAD('STRING','',N)
5 % A = STRREAD('STRING','',param,value, ...)
6 % A = STRREAD('STRING','',N,param,value, ...) reads numeric data from
7 % the STRING into a single variable. If the string contains any text data,
8 % an error is produced.
9 %
10 % [A,B,C, ...] = STRREAD('STRING','FORMAT')
11 % [A,B,C, ...] = STRREAD('STRING','FORMAT',N)
12 % [A,B,C, ...] = STRREAD('STRING','FORMAT',param,value, ...)
13 % [A,B,C, ...] = STRREAD('STRING','FORMAT',N,param,value, ...) reads
14 % data from the STRING into the variables A,B,C,etc. The type of each
15 % return argument is given by the FORMAT string. The number of return
16 % arguments must match the number of conversion specifiers in the FORMAT
17 % string. If there are more specifiers in FORMAT than fields in STRING,
18 % STRREAD returns an empty value for each extra specifier.
19 %
20 % If N is specified, the format string is reused N times. If N is -1 (or
21 % not specified) STRREAD reads the entire string.
22 %
23 % Example
24 %
25 % s = sprintf('a,1,2\nb,3,4\n');
26 % [a,b,c] = strread(s,'%s%d%d','delimiter',',')
27 %
28 % See TEXTREAD for more examples and definition of terms.
29 % The TEXTSCAN function is intended as a replacement for both STRREAD and
30 % TEXTREAD.
31 %
32 % See also TEXTSCAN, TEXTREAD, SSCANF, FILEFORMATS, STRTOK.
33
34 % Copyright 1984-2006 The MathWorks, Inc.
35 % $Revision: 1.1.6.9 $ $Date: 2006/06/20 20:12:52 $
36
37 % Implemented as a mex file.
38
39 % do some preliminary error checking
2040 40 if nargin < 1
41 error(nargchk(1,inf,nargin, 'struct'));
42 end
43
2040 44 if nargout == 0
45 nlhs = 1;
2040 46 else
0.03 2040 47 nlhs = nargout;
2040 48 end
0.02 2040 49 num = numel(varargin{1});
0.02 2040 50 if num < 4095 % 4095 is dataread's buffer limit
0.19 2020 51 [varargout{1:nlhs}]=dataread('string',varargin{:});
20 52 else % Unicode chars are two bytes
20 53 if nargin < 2
54 %If format was not passed in, make sure to pass empty one.
55 [varargout{1:nlhs}]=dataread('string',varargin{:}, '', 'bufsize',2*num );
20 56 else
20 57 [varargout{1:nlhs}]=dataread('string',varargin{:},'bufsize',2*num );
0.01 20 58 end
20 59 end