分割表であると私が信じているものを構築しようとすると、次のことを考慮してください。
dist = Parallelize[Table[RandomVariate[NormalDistribution[]], {100000}]];
dist2 = Rest@FoldList[0.95 # + #2 &, 0, dist];
dist3 = Rest@FoldList[0.95 # + Abs[#2] &, 0, dist];
dist4 = {dist2, dist3}\[Transpose]
q1 = Flatten[{Quantile[dist2, {1/3, 2/3}], Quantile[dist3, {1/3, 2/3}]}]
{-1.39001, 1.33851, 15.0327, 16.6757}
私がする必要があること:dist4の各要素について、それが属する下の9つのボックスで見る必要があります:
for example : {1.55191, 15.7189} belongs to 2
1.55 belongs to 1 and
15.71 belongs to 8
So the intersection is 2.
If や Switch を試しましたが、書くには長すぎます。これを自動的に行う方法はありますか?