September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,38 @@
|
|||
mata
|
||||
// 5th term of Van der Corput sequence
|
||||
halton(1,1,5)
|
||||
.625
|
||||
|
||||
// the first 10 terms of Van der Corput sequence
|
||||
halton(10,1)
|
||||
1
|
||||
+---------+
|
||||
1 | .5 |
|
||||
2 | .25 |
|
||||
3 | .75 |
|
||||
4 | .125 |
|
||||
5 | .625 |
|
||||
6 | .375 |
|
||||
7 | .875 |
|
||||
8 | .0625 |
|
||||
9 | .5625 |
|
||||
10 | .3125 |
|
||||
+---------+
|
||||
|
||||
// the first 10 terms of Van der Corput sequence in base 3
|
||||
ghalton(10,3,0)
|
||||
1
|
||||
+---------------+
|
||||
1 | .3333333333 |
|
||||
2 | .6666666667 |
|
||||
3 | .1111111111 |
|
||||
4 | .4444444444 |
|
||||
5 | .7777777778 |
|
||||
6 | .2222222222 |
|
||||
7 | .5555555556 |
|
||||
8 | .8888888889 |
|
||||
9 | .037037037 |
|
||||
10 | .3703703704 |
|
||||
+---------------+
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
clear
|
||||
mata
|
||||
st_addobs(2500)
|
||||
st_addvar("double","x")
|
||||
st_addvar("double","y")
|
||||
st_addvar("double","z")
|
||||
k=1::2500
|
||||
st_store(k,1,k)
|
||||
st_store(k,2,0.5*runiform(2500,1))
|
||||
st_store(k,3,0.5:+0.5*halton(2500,1))
|
||||
end
|
||||
twoway scatter y x, msize(tiny) color(blue) ///
|
||||
|| scatter z x, msize(tiny) color(green)
|
||||
Loading…
Add table
Add a link
Reference in a new issue