root/applications/dual/SIDP/transformace/init_hyperstate.m @ 965

Revision 862, 0.9 kB (checked in by zimamiro, 15 years ago)
Line 
1function [H,mi]=init_hyperstate(sidp_parameters, apriori)
2%OK
3dim=2;
4H=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^dim,dim);  %prostor hyperstavu - kazdy bod ma souradnice (y, b, P)
5mi=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^dim);  %nejlepsi nalezena rozhodnuti - pocatecni strategie =0
6
7%nastavi H0
8step_eta_tilda0=apriori.eta_tilda0_range/(sidp_parameters.n_grid-1);
9min_eta_tilda0=apriori.eta_tilda0;
10step_beta_tilda0=apriori.beta_tilda0_range/(sidp_parameters.n_grid-1);
11min_beta_tilda0=apriori.beta_tilda0;
12for 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        mi(j,i)=0.1*abs(randn)*H(1,i,2)/H(1,i,1)*2^(j-1);
17    end
18  %  plot(H(1,:,1),H(1,:,2),'r.');
19end
20
21end
22
23
Note: See TracBrowser for help on using the browser.