Revision 1181, 0.6 kB
(checked in by zimamiro, 14 years ago)
|
|
Line | |
---|
1 | function [H,C]=init_hyperstate(n_grid, apriori, mode)
|
---|
2 | switch(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;
|
---|
17 | end
|
---|
18 | end
|
---|
19 |
|
---|
20 |
|
---|