root/applications/dual/SIDP/jednoduchy system/init_hyperstate.m @ 1093

Revision 862, 0.9 kB (checked in by zimamiro, 15 years ago)
Line 
1function [H,u]=init_hyperstate(sidp_parameters, system, apriori)
2%OK
3
4H=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim,system.dim);  %prostor hyperstavu - kazdy bod ma souradnice (y, b, P)
5u=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim);  %nejlepsi nalezena rozhodnuti - pocatecni strategie =0
6
7%nastavi H0
8step_y0=apriori.y0_range/(sidp_parameters.n_grid-1)*2;
9min_y0=apriori.y0-apriori.y0_range;
10step_b0=apriori.b0_range/(sidp_parameters.n_grid-1)*2;
11min_b0=apriori.b0-apriori.b0_range;
12step_P0=apriori.P0_range/(sidp_parameters.n_grid-1)*2;
13min_P0=apriori.P0-apriori.P0_range;
14for i=1:size(H,2)
15    H(1,i,1)=min_y0+step_y0*(index(i,sidp_parameters.n_grid,1)-1);
16    H(1,i,2)=min_b0+step_b0*(index(i,sidp_parameters.n_grid,2)-1);
17    H(1,i,3)=min_P0+step_P0*(index(i,sidp_parameters.n_grid,3)-1);
18    for j=1:1:sidp_parameters.horizont
19        u(j,i)=0.1*(randn-0.5);
20    end
21end
22
23end
24
25
Note: See TracBrowser for help on using the browser.