This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
51 | [varargout{1:nlhs}]=dataread('... | 2020 | 0.190 s | 63.3% |  |
47 | nlhs = nargout; | 2040 | 0.030 s | 10.0% |  |
50 | if num < 4095 % 4095 is da... | 2040 | 0.020 s | 6.7% |  |
49 | num = numel(varargin{1}); | 2040 | 0.020 s | 6.7% |  |
58 | end | 20 | 0.010 s | 3.3% |  |
All other lines | | | 0.030 s | 10.0% |  |
Totals | | | 0.300 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
dataread | MEX-file | 2040 | 0.080 s | 26.7% |  |
Self time (built-ins, overhead, etc.) | | | 0.220 s | 73.3% |  |
Totals | | | 0.300 s | 100% | |
Code Analyzer results
Line number | Message |
51 | DATAREAD will be removed in a future release. Use TEXTSCAN instead. |
55 | DATAREAD will be removed in a future release. Use TEXTSCAN instead. |
57 | DATAREAD will be removed in a future release. Use TEXTSCAN instead. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 59 |
Non-code lines (comments, blank lines) | 41 |
Code lines (lines that can run) | 18 |
Code lines that did run | 14 |
Code lines that did not run | 4 |
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