This is a static copy of a profile reportHome
importdata>LocalTextRead (4 calls, 10.591 sec)
Generated 05-Aug-2011 13:01:22 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/iofun/importdata.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
importdata | function | 4 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
267 | [out.data, out.textdata, heade... | 4 | 9.662 s | 91.2% |  |
265 | fileString = fileread(filename... | 4 | 0.929 s | 8.8% |  |
269 | end | 4 | 0 s | 0% |  |
268 | out = LocalRowColShuffle(out); | 4 | 0 s | 0% |  |
266 | bWarn = true; | 4 | 0 s | 0% |  |
All other lines | | | 0.000 s | 0.0% |  |
Totals | | | 10.591 s | 100% | |
Children (called functions)
Code Analyzer results
Line number | Message |
256 | FINDSTR will be removed in a future release. Use STRFIND instead. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 29 |
Non-code lines (comments, blank lines) | 4 |
Code lines (lines that can run) | 25 |
Code lines that did run | 13 |
Code lines that did not run | 12 |
Coverage (did run/can run) | 52.00 % |
Function listing
time calls line
241 function [out, delimiter, headerlines] = LocalTextRead(filename, delim, hlines)
242 % get the delimiter for the file
4 243 if isnan(delim.requested)
244 fid = fopen(filename);
245 str = fread(fid, 4096,'*char')';
246 fclose(fid);
247 delim.printed = guessdelim(str);
248 delim.requested = delim.printed;
249
4 250 else
4 251 delim.printed = sprintf(delim.requested);
4 252 end
4 253 delimiter = delim.printed;
254 % try load first (it works with tabs, spaces, and commas)
4 255 out = [];
4 256 if isnan(hlines) && ~isempty(findstr(delim.printed, sprintf('\t ,')))
257 try
258 out = load('-ascii', filename);
259 headerlines = 0;
260 catch exception %#ok<NASGU>
261 out = '';
262 end
263 end
4 264 if isempty(out)
0.93 4 265 fileString = fileread(filename);
4 266 bWarn = true;
9.66 4 267 [out.data, out.textdata, headerlines] = parse(fileString, delim, hlines, bWarn);
4 268 out = LocalRowColShuffle(out);
4 269 end
Other subfunctions in this file are not included in this listing.