Commit | Line | Data |
---|---|---|
7b272073 BA |
1 | function[phiInit,rhoInit,piInit,gamInit] = basicInitParameters(n,p,m,k) |
2 | ||
3 | phiInit = zeros(p,m,k); | |
4 | ||
5 | piInit = (1.0/k) * ones(1,k); | |
6 | ||
7 | rhoInit = zeros(m,m,k); | |
8 | for r=1:k | |
9 | rhoInit(:,:,r) = eye(m,m); | |
10 | end | |
11 | ||
12 | gamInit = 0.1 * ones(n,k); | |
13 | R = random('unid',k,n,1); | |
14 | for i=1:n | |
15 | gamInit(i,R(i)) = 0.9; | |
16 | end | |
17 | gamInit = gamInit / (sum(gamInit(1,:))); | |
18 | ||
19 | end |