Skip to content

Instantly share code, notes, and snippets.

@dzonesasaki
Last active December 8, 2022 01:14
Show Gist options
  • Save dzonesasaki/d8ae371920a2e4682fac42d6e755a0be to your computer and use it in GitHub Desktop.
Save dzonesasaki/d8ae371920a2e4682fac42d6e755a0be to your computer and use it in GitHub Desktop.
make 2 cluster sample data using LCG and Box-Muller for SpreadSheet
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 13 columns, instead of 12. in line 1.
"param1" "param2" "param3" "LCG_1" "LCG_2" "LCG_3" "BoxMuller_I" "BoxMuller_Q" "Quantize" "X" "Y"
"multiplier" 3 20 21 3 50 12 =SQRT(-2*LN(E2/B$4+2^(-10)))*COS(2*PI()*F2/C$4) =SQRT(-2*LN(E2/B$4+2^(-10)))*SIN(2*PI()*F2/C$4) =rounddown(g2/D$4+0.5) =J2*B$10+H2*B$11 =J2*C$10+I2*C$11
"increment" 5 11 13 =MOD(E2*B$2+B$3,B$4) =MOD(F2*C$2+C$3,C$4) =MOD(G2*D$2+D$3,D$4)
"modulus" 101 103 105
"usage : copy E3,F3,G3 to bottom cell"
"modulus are equal to max length"
"E2,F2,G2 are initial value"
"H2,I2 are Box-Mullr method"
"J2 is quantization"
"K2,L2 are X-Y plot example" 1 1
"noise factor" 0.314 0.314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment