Thread Subject:
random numbers between an upper and a lower limit

Subject: random numbers between an upper and a lower limit

From: Joseph Frank

Date: 9 Sep, 2010 20:10:27

Message: 1 of 3

is it possible to generate numbers between an upper and a lower limit for example if I want to generate 120 random numners between 0.01 and 0.54 is it possible to do that using any matlab function?

Subject: random numbers between an upper and a lower limit

From: Sean

Date: 9 Sep, 2010 20:23:22

Message: 2 of 3

"joseph Frank" <josephfrank1969@hotmail.com> wrote in message <i6bevj$gte$1@fred.mathworks.com>...
> is it possible to generate numbers between an upper and a lower limit for example if I want to generate 120 random numners between 0.01 and 0.54 is it possible to do that using any matlab function?

One way:
my_random_numbers = rand(120,1)*(.54-.01)+.01

Subject: random numbers between an upper and a lower limit

From: Matt Fig

Date: 9 Sep, 2010 20:23:23

Message: 3 of 3

If you look at the help for RAND, near the bottom it tells how to do exactly what you want.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us