View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ricardo Moreno Ricardo Moreno is offline
external usenet poster
 
Posts: 1
Default Montw Carlo Simulation in excel

Hiya,

Ive been trying to use excel to do a Monte Carlo computation of the
energy distribution of compto scattered electrons from 60Co photon
irradiation. My problem is that I cannot implement the following
algorithm in excel. I just don't know how to do it.
Any tips?
1. Choose scatter angle
2. Compute energy distr_1
3. Generate random number_1
4. Compute energy distr_2
5. Generate random number_2
6. If R_2 less than or equal to step4/step2 accept else go back to
step2

The energy distribution is given by function

bla bla...

My problem is with step 6, how do I perform this in excel??