This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
rmfieldfunction7
datevecfunction40
datenumfunction40
plot_sourcesfunction2
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
30
end
890 s0%
29
end
890 s0%
28
c{i} = deblank(s(i,:));
890 s0%
27
for i=1:rows
890 s0%
26
c = cell(rows,1);	
890 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function35
Non-code lines (comments, blank lines)17
Code lines (lines that can run)18
Code lines that did run10
Code lines that did not run8
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.