Pre-Engineering 220 Introduction to MatLab ® & Scientific Programming j kiefer



Download 8.69 Mb.
Page102/128
Date02.05.2018
Size8.69 Mb.
#47255
1   ...   98   99   100   101   102   103   104   105   ...   128

We may use three separate sequences of pseudorandom numbers or simply take numbers from one sequence three at a time.
c. Alternate integration regions

i)

ii) Suppose the integration region is not rectangular. Then an extra step is needed, to test for and discard random points that fall outside the integration region.



e.g., a circle—discard points for which , as shown in the following diagram.

Why do it this way; to ensure that the points are uniformly distributed in all directions. If points are taken uniformly distributed in the radius, the points will be more widely spread the further out from the center they lie, not uniformly spread over the area of the circle.



Download 8.69 Mb.

Share with your friends:
1   ...   98   99   100   101   102   103   104   105   ...   128




The database is protected by copyright ©ininet.org 2024
send message

    Main page