-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEQ_create_print.m
executable file
·46 lines (37 loc) · 1.39 KB
/
EQ_create_print.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
function EQFile = EQ_create_print (type,ID,dim,geom,pos,slip,inv)
% EQ_create_print.m
% EQ Function that creates and prints to .eq files
% Nathanael Wong Zhixin, Feng Lujia
%
% This function is created for the purpose of printing the initial input
% information into .eq files, to be read and used for GTdef modelling
%
% INPUT: Earthquake event information
%
% OUTPUT:
% -- EQFile : name of .eq file created
%
% FORMAT OF CALL: EQ_create_print (type,ID,dim,geom,pos,slip,inv)
%
% OVERVIEW:
% 1) This function creates and prints data to a .eq file
%
% 2) The name of the .eq file is exported to the parent script
%
% VERSIONS:
% 1) -- Final version validated and commented on 20190715 by Nathanael Wong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CREATE FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EQFile = EQ_create_printFile(type,ID,pos,slip); fEQ = fopen(EQFile,'w');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PRINT DETAILS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EQ_create_printHead(fEQ,ID);
EQ_create_printType(fEQ,type);
EQ_create_printXYZ (fEQ,pos);
EQ_create_printDGeo(fEQ,dim,geom);
EQ_create_printSlip(fEQ,slip);
EQ_create_printInv0(fEQ,inv.O);
EQ_create_printInvX(fEQ,inv.X);
EQ_create_printInvN(fEQ,inv.N);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CLOSE FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fclose (fEQ);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end