This is a static copy of a profile reportHome
importdata>isvaliddata (4 calls, 0.022 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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
619 | numHeaderCols = maxNotData(cel... | 4 | 0.011 s | 50.0% |  |
617 | [cellstring indices] = split(f... | 4 | 0.011 s | 50.0% |  |
634 | end | 4 | 0 s | 0% |  |
629 | end | 4 | 0 s | 0% |  |
628 | status = 1; | 4 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 50 |
Non-code lines (comments, blank lines) | 11 |
Code lines (lines that can run) | 39 |
Code lines that did run | 23 |
Code lines that did not run | 16 |
Coverage (did run/can run) | 58.97 % |
Function listing
time calls line
585 function [status, numHeaderCols, numHeaderChars] = isvaliddata(fileString, delim)
586 % ISVALIDDATA delimiters and all numbers or e or + or . or -
587 % what about single columns???
588
4 589 numHeaderCols = 0;
4 590 numHeaderChars = 0;
591
4 592 if isempty(delim.printed)
593 % with no delimiter, the line must be all numbers, +, . or -
594 status = isdata(fileString);
595 return
596 end
597
4 598 status = 0;
4 599 if ~strcmp(delim.printed,'"')
4 600 fileString = regexprep(fileString, '"[^"]*"','""');
4 601 end
4 602 delims = strfind(fileString, delim.printed);
4 603 if isempty(delims)
604 checkstring = fileString;
605 if isempty(regexp(checkstring, '\S', 'once'))
606 % Just a blank line, not actually data.
607 status = 0;
608 return
609 end
4 610 else
4 611 checkstring = fileString(delims(end)+1:end);
4 612 end
613
614 % if there is data at the end of the line, it's legit
4 615 if isdata(checkstring)
4 616 try
0.01 4 617 [cellstring indices] = split(fileString, delim);
4 618 numNonEmptyCols = find(cellfun('isempty',deblank(cellstring)) == false, 1, 'last');
0.01 4 619 numHeaderCols = maxNotData(cellstring);
620 % use contents of 1st data cell to find num leading chars
4 621 if numHeaderCols > 0
622 numHeaderChars = indices(numHeaderCols);
623 end
4 624 if (numHeaderCols == numNonEmptyCols)
625 numHeaderCols = 0;
626 numHeaderChars = 0;
4 627 else
4 628 status = 1;
4 629 end
630 catch exception %#ok<NASGU>
631 numHeaderCols = 0;
632 numHeaderChars = 0;
633 end
4 634 end
Other subfunctions in this file are not included in this listing.