forked from iwbailey/processRFmatlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocessRFmatlab_startup.m
90 lines (74 loc) · 3.02 KB
/
processRFmatlab_startup.m
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%PROCESSRFMATLAB_STARTUP is a simple script to put the functions into
% your path. You need to manually set the root directory to wherever
% you saved the codes. If you want to have access to the functions
% every time you start matlab, put the code in this script into your
% startup.m file which is in your userpath (type userpath to find out
% where that is).
%-- processRFmatlab_startup.m ---
%
% Filename: processRFmatlab_startup.m
% Description: Get the functions into your matlab path
% Author: Iain W. Bailey
% Created: Mon Jun 18 20:58:29 2012 (-0400)
% Version: 1
% Last-Updated: Tue Jun 19 21:21:45 2012 (-0400)
% By: Iain W. Bailey
% Update #: 31
%
%-- Change Log:
%
%
% The following two lines will work if you put these codes
% directly into your matlab userpath.
%tmp_userpath = char(userpath);
% processRFmatlab_root = fullfile( tmp_userpath(1:end-1), ...
% 'processRFmatlab');
%
% Otherwise you can hard code it. For example, comment out the above
% two lines and add
% >> processRFmatlab_root='/path/to/processRFmatlab';
% on linux, or for windows
% >> processRFmatlab_root='C:\directory\where/you\saved\processRFmatlab'
%
% In my case...
processRFmatlab_root=['/home/iwbailey/seismology/programs/' ...
'processRFmatlab'];
% Check the directory exists
if ~exist(processRFmatlab_root, 'dir'),
error('You need to edit this script to point to your directory')
return;
end
% Now add the paths for all the functions individually
fprintf('Adding deconvolution functions to path\n');
addpath(fullfile(processRFmatlab_root,'deconvolution'));
fprintf('Adding depthmapping functions to path\n');
addpath(fullfile(processRFmatlab_root,'depthmapping'));
fprintf('Adding getinfo functions to path\n');
addpath(fullfile(processRFmatlab_root,'getinfo'));
fprintf('Adding inout functions to path\n');
addpath(fullfile(processRFmatlab_root,'inout'));
fprintf('Adding plotting functions to path\n');
addpath(fullfile(processRFmatlab_root,'plotting'));
fprintf('Adding signalprocessing functions to path\n');
addpath(fullfile(processRFmatlab_root,'signalprocessing'));
fprintf('Adding velocity models to path\n');
addpath(fullfile(processRFmatlab_root,'velmodels1D'));
% Clean up variables
clear processRFmatlab_root;
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation; either version 3, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; see the file COPYING. If not, write to
% the Free Software Foundation, Inc., 51 Franklin Street, Fifth
% Floor, Boston, MA 02110-1301, USA.
%
%-- Code:
%-- processRFmatlab_startup.m ends here