-
Notifications
You must be signed in to change notification settings - Fork 3
/
.octaverc
32 lines (28 loc) · 1.04 KB
/
.octaverc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function userDir = getuserdir()
%GETUSERDIR return the user home directory.
% USERDIR = GETUSERDIR returns the user home directory using the registry
% on windows systems and using Java on non windows systems as a string
%
% Example:
% getuserdir() returns on windows
% C:\Documents and Settings\MyName\Eigene Dateien
if ispc
% userDir = winqueryreg('HKEY_CURRENT_USER',...
% ['Software\Microsoft\Windows\CurrentVersion\' ...
% 'Explorer\Shell Folders'],'Personal');
userDir = getenv('MYDOCUMENTS');
else
% userDir = char(java.lang.System.getProperty('user.home'));
userDir = getenv('HOME');
end
end
STARTUPSCRIPT=[getuserdir(),filesep,'MATLAB',filesep,'startup.m']
disp(['Running ',STARTUPSCRIPT,' ...']);
run(STARTUPSCRIPT);
if version() == '3.4.0' || version() == '3.6.1'
disp('running startup()')
% This does not work on GNU Octave, version 3.2.4
% but works on GNU Octave, version 3.4.0 and later...
startup()
end
disp('...done');