This is a static copy of a profile reportHome
cellstr (89 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:00 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/strfun/cellstr.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
30 | end | 89 | 0 s | 0% |  |
29 | end | 89 | 0 s | 0% |  |
28 | c{i} = deblank(s(i,:)); | 89 | 0 s | 0% |  |
27 | for i=1:rows | 89 | 0 s | 0% |  |
26 | c = cell(rows,1); | 89 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 35 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 18 |
Code lines that did run | 10 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 55.56 % |
Function listing
time calls line
1 function c = cellstr(s)
2 %CELLSTR Create cell array of strings from character array.
3 % C = CELLSTR(S) places each row of the character array S into
4 % separate cells of C.
5 %
6 % Use CHAR to convert back.
7 %
8 % Another way to create a cell array of strings is by using the curly
9 % braces:
10 % C = {'hello' 'yes' 'no' 'goodbye'};
11 %
12 % See also STRINGS, CHAR, ISCELLSTR.
13
14 % Copyright 1984-2006 The MathWorks, Inc.
15 % $Revision: 1.16.4.9 $ $Date: 2010/08/23 23:13:16 $
16 %==============================================================================
17
89 18 if ischar(s)
89 19 if isempty(s)
20 c = {''};
89 21 else
89 22 if ndims(s)~=2
23 error(message('MATLAB:cellstr:InputShape'))
24 end
89 25 [rows,cols]=size(s);%#ok ignore rows
89 26 c = cell(rows,1);
89 27 for i=1:rows
89 28 c{i} = deblank(s(i,:));
89 29 end
89 30 end
31 elseif iscellstr(s)
32 c = s;
33 else
34 error(message('MATLAB:cellstr:InputClass'))
35 end
Other subfunctions in this file are not included in this listing.