root/applications/dual/SIDP/SIDPS/matlab/init_hyperstate.m @ 1197

Revision 1181, 0.6 kB (checked in by zimamiro, 14 years ago)
Line 
1function [H,C]=init_hyperstate(n_grid, apriori, mode)
2switch(mode)
3    case(0)
4        C=zeros(1,n_grid);
5        step=apriori.beta0_range/(n_grid-1)*2;
6        min=apriori.beta0-apriori.beta0_range;
7        max=apriori.beta0+apriori.beta0_range;
8        H=min:step:max; 
9    case(1)
10        C=zeros(1,n_grid);
11        a=0:1/(n_grid-1):1;
12        min=apriori.beta0-apriori.beta0_range;
13        max=apriori.beta0+apriori.beta0_range;
14        H=(max-min)/(exp(1)-1)*exp(a)+(exp(1)*min-max)/(exp(1)-1);
15    case(2)
16        [H C]=load_H;
17end
18end
19
20
Note: See TracBrowser for help on using the browser.