This is a static copy of a profile reportHome
graphics/private/name>fixTilde (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:34 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/name.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
155 | end | 40 | 0 s | 0% |  |
138 | if (fileName(1) == '~' &&a... | 40 | 0 s | 0% |  |
137 | if (isunix && (length(... | 40 | 0 s | 0% |  |
135 | filename = fileName; | 40 | 0 s | 0% |  |
134 | persistent homeDir; % keep tra... | 40 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isunix | function | 40 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 23 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 15 |
Code lines that did run | 5 |
Code lines that did not run | 10 |
Coverage (did run/can run) | 33.33 % |
Function listing
time calls line
133 function filename = fixTilde(fileName)
40 134 persistent homeDir; % keep track of user's home dir
40 135 filename = fileName;
136 % yes, we tested for isunix above...but in case that test gets deleted
40 137 if (isunix && (length(fileName) > 1))
40 138 if (fileName(1) == '~' && fileName(2) == filesep)
139 if isempty(homeDir)
140 % save current location,
141 % go 'home' and remember that location
142 % switch back to original location
143 currDir = pwd;
144 cd('~');
145 homeDir = pwd;
146 cd(currDir);
147 end
148 if ~isempty(homeDir)
149 % now that we know where the home dir is
150 % replace 1st char (~) with user's home dir and take rest of
151 % path specified
152 filename = [homeDir fileName(2:end)];
153 end
154 end
40 155 end
Other subfunctions in this file are not included in this listing.