为了建设我认为是一个应急表,请考虑如下:
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}
What I need to do : For each element of dist4 I need to see with of the 9 box below it belongs to :
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.
我曾尝试过,如果是,还是转手,但要写得很长。 是否有这样做的自动途径?