# comp4 - Computer project 4 PHZ 5156 Results due Tuesday...

This preview shows pages 1–2. Sign up to view the full content.

Computer project 4 PHZ 5156 Results due Tuesday October 24 Please submit your code and plots wherever requested. Results can be handed in either as a hardcopy, or as an electronic document (e.g. tex, latex, MS word, or even a .pdf) sent via email. This assignment makes extensive use of the ran2.f subroutine provided from Numer- ical Recipes in Fortran. 1. Write a code using ran2.f that computes the average of many generated random numbers. Also, create and plot a histogram with the frequency of random numbers in certain ranges between zero and one. Does the average come out to be close to 1 2 if you generate enough numbers? Finally, does the distribution of numbers in your histogram look to be uniform? Include a histogram with your report. 2. For a random number sequence I 1 , I 2 , I 3 , ..., I N , compute correlations between numbers in the sequence. For example, for neighboring numbers in the sequence, we compute, G 1 = 1 N - 1 N - 1 X i =1 ( I i - 1 2 )( I i +1 - 1 2 ) where we are assuming that the average of the sequence is

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

comp4 - Computer project 4 PHZ 5156 Results due Tuesday...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online