-
Notifications
You must be signed in to change notification settings - Fork 0
/
comparison_markov_p_simulated.m
61 lines (54 loc) · 1.28 KB
/
comparison_markov_p_simulated.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
addpath('~/git/PMCSN_Simulation');
p_1_1_markov = [];
p_1_2_markov = [];
p_2_1_markov = [];
p_2_2_markov = [];
p_2_S_2_markov = [];
N_test = N_bad(1)
for S_now = 1:N_test
[p_1_1_now, p_1_2_now, p_2_1_now, p_2_2_now, p_2_S_2_now] = markov_analysis(N_test,S_now);
p_1_1_markov = [p_1_1_markov p_1_1_now];
p_1_2_markov = [p_1_2_markov p_1_2_now];
p_2_1_markov = [p_2_1_markov p_2_1_now];
p_2_2_markov = [p_2_2_markov p_2_2_now];
p_2_S_2_markov = [p_2_S_2_markov p_2_S_2_now];
end
%%
plot(S_bad, p_1_1_bad)
axis([1,S_bad(1)+1,0,0.5])
hold on
plot(S_bad, p_1_1_good)
plot(S_bad, p_1_1_markov')
legend('bad','good','markov')
title('p path 1 1, N = 10')
xlabel('S')
%%
hold off
plot(S_bad, p_1_2_bad)
axis([1,S_bad(1)+1,0,0.000000000000002])
hold on
plot(S_bad, p_1_2_good)
plot(S_bad, p_1_2_markov')
legend('bad','good','markov')
title('p path 1 2, N = 10')
%%
plot(S_bad, p_2_S_2_bad)
hold on
plot(S_bad, p_2_S_2_good)
plot(S_bad, p_2_S_2_markov')
legend('bad','good','markov')
title('p path 2 S 2,N=10')
%%
plot(S_bad, p_2_2_bad)
hold on
plot(S_bad, p_2_2_good)
plot(S_bad, p_2_2_markov')
legend('bad','good','markov')
title('p path 2 2,N=10')
%%
plot(S_bad, p_2_1_bad)
hold on
plot(S_bad, p_2_1_good)
plot(S_bad, p_2_1_markov')
legend('bad','good','markov')
title('p path 2 1,N=10')