(New page: 1. Generating uniformly distributed random numbers between 0 and 1: U(0,1) a) Using matlab functions The rand function returns uniformly distributed random numbers between 0 and 1. r = ...)
(No difference)

Revision as of 15:49, 15 April 2013

1. Generating uniformly distributed random numbers between 0 and 1: U(0,1)

a) Using matlab functions

The rand function returns uniformly distributed random numbers between 0 and 1.

r = rand(n) returns an n-by-n matrix containing pseudorandom values drawn from the standard uniform distribution on the open interval (0,1). r = rand(m,n) or r = rand([m,n]) returns an m-by-n matrix.

Example: rand(1, 5)

ans = 0.8147 0.9058 0.127 0.9134 0.6324

Alumni Liaison

To all math majors: "Mathematics is a wonderfully rich subject."

Dr. Paul Garrett