Plot multiple realizations of a Makrov chain in the same plot

2 ビュー (過去 30 日間)
Håvard Rivedal
Håvard Rivedal 2018 年 9 月 21 日
回答済み: Naman Chaturvedi 2018 年 9 月 24 日
I would like to plot 25 realizations of a stochastic (Makrov Chain) process in one plot.
I have the code for one realization:
n = 50;
q = 1:1:50;
S0 = [0.99 0.01]; % Initial state distribution matrix
P = [0.95 0.05 ; 0.00 1.00]; % Transition probability matrix
array = [];
for i = 1:n
A = P^i;
y = S0.*A;
array = [array,y(1)];
end
disp(array)
plot(q,array)

回答 (1 件)

Naman Chaturvedi
Naman Chaturvedi 2018 年 9 月 24 日

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by