This is a static copy of a profile report

Home

general/private/catdirs (2 calls, 0.010 sec)
Generated 14-Nov-2016 07:47:09 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/general/private/catdirs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
addpathfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
26
next = strtrim(next);
20.010 s100.0%
30
end
20 s0%
29
end
20 s0%
28
cdirs = [cdirs next pathsep]; ...
20 s0%
27
if ~isempty(next)
20 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
pathsepfunction20 s0%
Self time (built-ins, overhead, etc.)  0.010 s100.0%
Totals  0.010 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function30
Non-code lines (comments, blank lines)17
Code lines (lines that can run)13
Code lines that did run11
Code lines that did not run2
Coverage (did run/can run)84.62 %
Function listing
time 
calls 
 line
   1 
function cdirs = catdirs(varargin)
   2 
%CATDIRS Concatenate separate strings of directories into one string. 
   3 
%   CATDIRS DIRNAME checks that DIRNAME is a string, removes any leading
   4 
%   or tailing whitespace, and appends a path separator.
   5 
%
   6 
%   CATDIRS  DIR1 DIR2 DIR3 ... for each input, checks it is a string, removes 
   7 
%    any leading or tailing whitespace, and appends a path separator; and then 
   8 
%    concatenates all these strings.
   9 
%
  10 
%   Example:
  11 
%       dirlist = catdirs('/home/user/matlab','/home/user/matlab/test');
  12 

  13 
%   Copyright 1984-2011 The MathWorks, Inc.
  14 

      2 
  15 
n= nargin; 
      2 
  16 
narginchk(1,Inf); 
  17 

      2 
  18 
cdirs = ''; 
  19 

      2 
  20 
for i=1:n 
      2 
  21 
    next = varargin{i}; 
      2 
  22 
    if ~ischar(next) 
  23 
        error(message('MATLAB:catdirs:ArgNotString'));
  24 
    end
  25 
    % Remove leading and trailing whitespace
  0.01 
      2 
  26 
	next = strtrim(next); 
      2 
  27 
    if ~isempty(next) 
      2 
  28 
        cdirs = [cdirs next pathsep]; %#ok<AGROW> 
      2 
  29 
    end 
      2 
  30 
end