Revision 1105, 0.8 kB
(checked in by zimamiro, 15 years ago)
|
|
Line | |
---|
1 | function [H,ny]=init_hyperstate(sidp_parameters, apriori) |
---|
2 | %OK |
---|
3 | dim=2; |
---|
4 | H=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^dim,dim); %prostor hyperstavu - kazdy bod ma souradnice (y, b, P) |
---|
5 | ny=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^dim); %nejlepsi nalezena rozhodnuti - pocatecni strategie =0 |
---|
6 | |
---|
7 | %nastavi H0 |
---|
8 | step_eta0=apriori.eta_tilda0_range/(sidp_parameters.n_grid-1); |
---|
9 | min_eta_tilda0=apriori.eta_tilda0; |
---|
10 | step_beta_tilda0=apriori.beta_tilda0_range/(sidp_parameters.n_grid-1); |
---|
11 | min_beta_tilda0=apriori.beta_tilda0; |
---|
12 | for i=1:size(H,2) |
---|
13 | H(1,i,1)=min_eta_tilda0+step_eta_tilda0*(index(i,sidp_parameters.n_grid,1)-1); |
---|
14 | H(1,i,2)=min_beta_tilda0+step_beta_tilda0*(index(i,sidp_parameters.n_grid,2)-1); |
---|
15 | for j=1:1:sidp_parameters.horizont |
---|
16 | ny(j,i)=0.1*abs(randn); |
---|
17 | end |
---|
18 | plot(H(1,:,1),H(1,:,2),'r.'); |
---|
19 | end |
---|
20 | |
---|
21 | end |
---|
22 | |
---|