This is a static copy of a profile reportHome
findspaces (3 calls, 0.011 sec)
Generated 05-Aug-2011 13:01:16 using cpu time.
function in file /home/LeechJ/cbass_analysis/matutils/findspaces.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 |
17 | f=regexpi(lin,' '); | 3 | 0.011 s | 100.0% |  |
29 | end | 40 | 0 s | 0% |  |
28 | end | 20 | 0 s | 0% |  |
27 | j=j+1; | 20 | 0 s | 0% |  |
26 | list{j}=str; | 20 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.011 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
26 | The variable 'list' appears to change size on every loop iteration. Consider preallocating for speed. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 29 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 12 |
Code lines that did run | 12 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function list=findspaces(lin)
2
3 % function list=findspaces(lin)
4 %
5 % extracts elements of string, lin, ignoring multiple spaces.
6 %
7 % Example:
8 % str='you are dumb';
9 %
10 % list{1}='you'
11 % list{2}='are'
12 % list{3}='dumb'
13 %
14 % Michael Loh
15
16 % find spaces
0.01 3 17 f=regexpi(lin,' ');
3 18 f(end+1)=length(lin);
3 19 f(end+1)=1;
3 20 f=[f(end) f(1:end-1)];
21
3 22 j=1;
3 23 for i=2:length(f)
40 24 str=sscanf(lin(f(i-1):f(i)),'%s');
40 25 if (~isempty(str))
20 26 list{j}=str;
20 27 j=j+1;
20 28 end
40 29 end
Other subfunctions in this file are not included in this listing.