-
Notifications
You must be signed in to change notification settings - Fork 0
/
Figure5.m
38 lines (33 loc) · 1.05 KB
/
Figure5.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
%% Script to generate figures from Maurer & Segall, Fig. 5
% pick a(t), rho_max
a = 2500; % 250 or 2500 m
maxrho = 1500; % 500 or 1500 m
% other parameters
minrho = mw2rs(0.5);
b = 1;
Nx = 1000;
% Compute the analytical expression
[ Prs, rx, Frs,Pin, Pp, Pr] = Compute_Prs_num(maxrho/a,minrho/a, b,Nx);
% Plot the individual contribution
figure;
loglog(rx.*a, Pin./a, 'b')
hold on
loglog(rx.*a, Pp./a, '--')
loglog(rx.*a, Pr./a, ':', 'LineWidth', 2)
plot([a, a], [min([Pp(:); Pin(:)]./a), max([Pp(:); Pin(:)]./a)])
xlabel('Normalized Fault Size')
ylabel('Relative Frequency')
legend('P_{in}', 'P_p', 'P_r', 'a(t)')
title('Components of P(r_s)')
axis tight
% Plot the full solution and compare to Segall & Lu, 2015
figure;
loglog(rx.*a, Prs./a)
hold on
loglog(rx.*a, Pin./a, '--')
plot([a, a], [min([Prs(:); Pin(:)]./a), max([Prs(:); Pin(:)]./a)])
xlabel('M_W')
ylabel('Relative Frequency')
legend('Maurer-Segall 2017', 'Segall-Lu 2015', 'a(t)')
title('Comparing Maurer & Segall 2017 to Segall & Lu 2015')
axis tight