-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEQ_create_geomstr.m
executable file
·54 lines (45 loc) · 1.47 KB
/
EQ_create_geomstr.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
function str = EQ_create_geomstr (flt)
% EQ_input_geomstr.m
% EQ Function that defines user input for the fault strike
% Nathanael Wong Zhixin, Feng Lujia
%
% This function is created for the purpose of determining the strike of the
% fault by user input.
%
% INPUT:
% -- flt : fault input type for model
%
% OUTPUT:
% -- str : fault strike
%
% FORMAT OF CALL: EQ_create_geomstr (model type)
%
% OVERVIEW:
% 1) This calls as input flt, which in GTdef expresses the type of fault
% model input information required.
%
% 2) If flt is equal to 1 and 3, then the strike input is required.
% Otherwise, flt is set to NaN.
%
% VERSIONS:
% 1) -- Created on 20160614 by Nathanael Wong
%
% 2) -- Rewritten sometime in 2017
%
% 3) -- Final version validated and commented on 20190715 by Nathanael Wong
%%%%%%%%%%%%%%%%%%%%%%%%% IMPORT THE FAULT STRIKE %%%%%%%%%%%%%%%%%%%%%%%%%
if flt == 1 || flt == 3
disp ('The value of strike ranges from 0 to 360. All angles');
disp ('measured are clockwise from north.');
str = input ('Strike of Fault (d): ');
disp (' ')
while str(1) < 0 || str(1) > 360
disp ('Error! Strike must be between 0 to 360.');
str = input ('Strike of Fault (d): ');
disp (' ')
end
elseif flt == 2 || flt == 4
str = NaN;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end