root/applications/dual/SIDP/Kopie (2) - finalni implementace/init_hyperstate.m @ 1153

Revision 1113, 0.7 kB (checked in by zimamiro, 14 years ago)
Line 
1function [H,ny]=init_hyperstate(N, n_grid, apriori, mode)
2%OK
3if mode ==0
4    dim=2;
5    H=zeros(N,n_grid^dim,dim);  %prostor hyperstavu - kazdy bod ma souradnice (y, b, P)
6    ny=zeros(N,n_grid^dim);  %nejlepsi nalezena rozhodnuti - pocatecni strategie =0
7    %ny=abs(rand(N-1,n_grid^dim)); 
8
9    %nastavi H0
10    step_eta0=apriori.eta0_range/(n_grid-1)*2;
11    min_eta0=apriori.eta0-apriori.eta0_range;
12    step_beta0=apriori.beta0_range/(n_grid-1)*2;
13    min_beta0=apriori.beta0-apriori.beta0_range;
14    for i=1:size(H,2)
15        H(1,i,1)=min_eta0+step_eta0*(index(i,n_grid,1)-1);
16        H(1,i,2)=min_beta0+step_beta0*(index(i,n_grid,2)-1);
17       % plot(H(1,:,1),H(1,:,2),'r.'); hold on
18    end
19else
20    [H ny]=load_H;
21end
22
23
Note: See TracBrowser for help on using the browser.