This is a static copy of a profile reportHome
where_am_i (36 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:17 using cpu time.
function in file /home/LeechJ/cbass_analysis/where_am_i.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 |
75 | return; | 36 | 0 s | 0% |  |
21 | if (~length(home)) | 36 | 0 s | 0% |  |
14 | if(~length(installeddir)) | 36 | 0 s | 0% |  |
12 | installeddir = getenv('CBASS_I... | 36 | 0 s | 0% |  |
11 | home = getenv('CBASS_HOME'); | 36 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
14 | IF might not be aligned with its matching END (line 19). |
14 | Using ISEMPTY is usually faster than comparing LENGTH to 0. |
21 | Using ISEMPTY is usually faster than comparing LENGTH to 0. |
25 | The value assigned here to 'r' appears to be unused. Consider replacing it by ~. |
26 | The value assigned here to 'r' appears to be unused. Consider replacing it by ~. |
49 | Terminate statement with semicolon to suppress output (in functions). |
58 | Use && instead of & as the AND operator in (scalar) conditional statements. |
60 | Use && instead of & as the AND operator in (scalar) conditional statements. |
62 | Use && instead of & as the AND operator in (scalar) conditional statements. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 75 |
Non-code lines (comments, blank lines) | 40 |
Code lines (lines that can run) | 35 |
Code lines that did run | 5 |
Code lines that did not run | 30 |
Coverage (did run/can run) | 14.29 % |
Function listing
time calls line
1 function [home,installeddir] = where_am_i()
2
3 % The purpose of this function is to return
4 % the users home dir and the name of the installed dir (e.g. cbass_analysis)
5 %
6 % If you have installed somewhere non-standard e.g. cbass_analysis_latest
7 % change the line below to reflect the fact.
8
9 % First look for the environment variales.
10
36 11 home = getenv('CBASS_HOME');
36 12 installeddir = getenv('CBASS_INSTALLEDDIR');
13
36 14 if(~length(installeddir))
15 % No installed dir enviro variable found
16 % set by hand here.
17 installeddir='cbass_analysis';
18 %disp(['Warn: No CBASS_INSTALLEDDIR environment variable found - will default to: ',installeddir]);
19 end
20
36 21 if (~length(home))
22
23 % get the home dir the "manual" way...
24
25 [r, home] = unix('printenv HOME');
26 [r, hostname] = unix('printenv HOSTNAME');
27
28 %if ~strcmp(home(1:5),'/home')
29 % %case where you get tcsh shell error
30 % startpt=find(home=='/');
31 % home=home(startpt(1):end-1);
32 %
33 % clear startpt
34 %else
35 % home=home(1:end-1);
36 %end
37
38 if ~strcmp(home(1:5),'/home')
39 %case where you get tcsh shell error
40 startpt=find(home=='/');
41 home=home(startpt(1):end-1);
42 clear startpt
43 else
44 home=home(1:end-1);
45 end
46
47 %Fix to work on the computer of Angela :-)
48 if (~isempty(strfind(home,'taylora')))
49 home = '/Volumes/Data/CBASS'
50 addpath([home, '/cbass_analysis/angela']);
51 elseif( strfind(home, 'cbassusr'))
52 %Fix to work on falcon
53 home = '/scratch/falcon_4/cbassusr/cbass';
54 elseif(strfind(home, 'zuntz'))
55 home = '/Users/zuntz/src/cbass';
56 elseif(strfind(home,'mirfan'))
57 home = '/scratch/falcon_4/mirfan/cbass';
58 elseif(strfind(home,'cdickins') & strfind(hostname,'falcon'))
59 home = '/scratch/falcon_4/cdickins/cbass';
60 elseif(strfind(home,'cdickins') & strfind(hostname,'haggis'))
61 home = '/scr/cdickins/cbass';
62 elseif(strfind(home,'tjp') & strfind(hostname,'haggis'))
63 home = '/home/tjp';
64 elseif(strfind(home,'oliver'))
65 home = '/Users/oliver';
66 end
67 %disp(['Warn: No CBASS_HOME environment variable found will default to: ',home]);
68
69
70
71 end;
72
73 %disp(['Using home =',home,' : installed dir = ',installeddir]);
74
36 75 return;