This is a static copy of a profile report

Home

fullfile (121 calls, 0.032 sec)
Generated 04-Aug-2014 13:05:13 using cpu time.
function in file /share/apps/matlabr2014a/toolbox/matlab/iofun/fullfile.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
BGC_DO_simsvdICfunction121
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
44
theInputs{1} = ensureTrailingF...
1210.019 s60.0%
31
theInputs = varargin;
1210.006 s20.0%
28
narginchk(1, Inf);
1210.006 s20.0%
60
end
1210 s0%
56
f = refinePath(f);
1210 s0%
All other lines  0 s0%
Totals  0.032 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
fullfile>ensureTrailingFilesepsubfunction1210.006 s20.0%
fullfile>refinePathsubfunction1210 s0%
filesepfunction1210 s0%
Self time (built-ins, overhead, etc.)  0.026 s80.0%
Totals  0.032 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function60
Non-code lines (comments, blank lines)28
Code lines (lines that can run)32
Code lines that did run25
Code lines that did not run7
Coverage (did run/can run)78.12 %
Function listing
time 
calls 
 line
   1 
function f = fullfile(varargin)
   2 
%FULLFILE Build full file name from parts.
   3 
%   F = fullfile(FOLDERNAME1, FOLDERNAME2, ..., FILENAME) builds a full
   4 
%   file specification F from the folders and file name specified. Input
   5 
%   arguments FOLDERNAME1, FOLDERNAME2, etc. and FILENAME can be strings,
   6 
%   a scalar cell string, or same-sized cell arrays of strings. The output
   7 
%   of fullfile is conceptually equivalent to
   8 
%
   9 
%      F = [FOLDERNAME1 filesep FOLDERNAME2 filesep ... filesep FILENAME]
  10 
%
  11 
%   except that care is taken to handle the cases when the folders begin or
  12 
%   end with a file separator.
  13 
%
  14 
%   Examples
  15 
%     % To build platform dependent paths to files:
  16 
%        fullfile(matlabroot,'toolbox','matlab','general','Contents.m')
  17 
%
  18 
%     % To build platform dependent paths to a folder:
  19 
%        fullfile(matlabroot,'toolbox','matlab',filesep)
  20 
%
  21 
%     % To build a collection of platform dependent paths to files:
  22 
%        fullfile(toolboxdir('matlab'),'iofun',{'filesep.m';'fullfile.m'})
  23 
%
  24 
%   See also FILESEP, PATHSEP, FILEPARTS.
  25 

  26 
%   Copyright 1984-2012 The MathWorks, Inc.
  27 
    
< 0.01 
    121 
  28 
    narginchk(1, Inf); 
    121 
  29 
    fileSeparator = filesep; 
    121 
  30 
    argIsACell = cellfun('isclass', varargin, 'cell'); 
< 0.01 
    121 
  31 
    theInputs = varargin; 
    121 
  32 
    f = theInputs{1}; 
    121 
  33 
    try 
    121 
  34 
        if nargin == 1 
  35 
            f = refinePath(f);
  36 
            return;
    121 
  37 
        elseif any(argIsACell) 
  38 
            theInputs(cellfun(@(x)~iscell(x)&&isempty(x), theInputs)) = [];
    121 
  39 
        else 
    121 
  40 
            theInputs(cellfun('isempty', theInputs)) = ''; 
    121 
  41 
        end 
  42 
        
    121 
  43 
        if length(theInputs)>1 
  0.02 
    121 
  44 
            theInputs{1} = ensureTrailingFilesep(theInputs{1}); 
    121 
  45 
        end 
    121 
  46 
        if ~isempty(theInputs) 
    121 
  47 
            theInputs(2,:) = {fileSeparator}; 
    121 
  48 
            theInputs{2,1} = ''; 
    121 
  49 
            theInputs(end) = ''; 
    121 
  50 
            if any(argIsACell) 
  51 
                f = strcat(theInputs{:});
    121 
  52 
            else 
    121 
  53 
                f = [theInputs{:}]; 
    121 
  54 
            end 
    121 
  55 
        end 
    121 
  56 
        f = refinePath(f); 
  57 
    catch exc
  58 
        locHandleError(exc, theInputs(1,:));
  59 
    end   
    121 
  60 
end 

Other subfunctions in this file are not included in this listing.