This is a static copy of a profile report

Home

graphics/private/name>fixTilde (6 calls, 0.010 sec)
Generated 14-Nov-2016 07:47:16 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/private/name.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/namefunction6
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
134
if (isunix && (length(...
60.010 s100.0%
152
end
60 s0%
135
if (fileName(1) == '~' &&a...
60 s0%
132
filename = fileName;
60 s0%
131
persistent homeDir; % keep tra...
60 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isunixfunction60.010 s100.0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.010 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function23
Non-code lines (comments, blank lines)8
Code lines (lines that can run)15
Code lines that did run5
Code lines that did not run10
Coverage (did run/can run)33.33 %
Function listing
time 
calls 
 line
 130 
function filename = fixTilde(fileName)
      6 
 131 
persistent homeDir; % keep track of user's home dir 
      6 
 132 
filename = fileName; 
 133 
% yes, we tested for isunix above...but in case that test gets deleted
  0.01 
      6 
 134 
if (isunix && (length(fileName) > 1))  
      6 
 135 
    if (fileName(1) == '~' && fileName(2) == filesep) 
 136 
        if isempty(homeDir)
 137 
            % save current location, 
 138 
            % go 'home' and remember that location
 139 
            % switch back to original location
 140 
            currDir = pwd;
 141 
            cd('~');
 142 
            homeDir = pwd;
 143 
            cd(currDir);
 144 
        end
 145 
        if ~isempty(homeDir)
 146 
            % now that we know where the home dir is
 147 
            % replace 1st char (~) with user's home dir and take rest of
 148 
            % path specified
 149 
            filename = [homeDir fileName(2:end)];
 150 
       end
 151 
    end
      6 
 152 
end 

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