0
$\begingroup$

I have a grid of 256 points (0,1,....M-1), which I then want to distribute in sinusoid weighted Poisson Gap.

tpts = Table[t, {t, 0, 255}];

I define two functions such that (num =256):

p[j_] := A*Sin[(Pi/2)*(j/(num + 1))]
k[j_] := RandomVariate[PoissonDistribution[p[j]]]

I do the following to distribute these

tlist=Table[tpts[[j]] + RandomVariate[PoissonDistribution[p[j]]] + 1, {j, 1,J}] // N

I need to scale/choose A such that the last point of tlist is the same as last point of tpts. i.e. tlist[J]=M-1.

I can't figure out how to scale A in this way.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.