This is a static copy of a profile report

Home

cellstr (18 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:21 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/strfun/cellstr.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
rmfieldfunction12
datevecfunction3
datenumfunction3
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
28
end
180 s0%
27
c = deblank(c);
180 s0%
26
end
180 s0%
25
c{i} = s(i,:);
180 s0%
24
for i = 1:numrows
180 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 function33
Non-code lines (comments, blank lines)15
Code lines (lines that can run)18
Code lines that did run11
Code lines that did not run7
Coverage (did run/can run)61.11 %
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-2013 The MathWorks, Inc.
  15 

     18 
  16 
if ischar(s) 
     18 
  17 
    if isempty(s) 
  18 
        c = {''};
     18 
  19 
    elseif ~ismatrix(s) 
  20 
        error(message('MATLAB:cellstr:InputShape'))
     18 
  21 
    else 
     18 
  22 
        numrows = size(s,1); 
     18 
  23 
        c = cell(numrows,1); 
     18 
  24 
        for i = 1:numrows 
     18 
  25 
            c{i} = s(i,:); 
     18 
  26 
        end 
     18 
  27 
        c = deblank(c); 
     18 
  28 
    end 
  29 
elseif iscellstr(s)
  30 
    c = s;
  31 
else
  32 
    error(message('MATLAB:cellstr:InputClass'))
  33 
end