The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: how can generate random integer numbers?
Replies: 8   Last Post: Mar 19, 2013 6:02 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Francesco Perrone

Posts: 39
Registered: 5/2/12
Re: how can generate random integer numbers?
Posted: Mar 19, 2013 2:49 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sahan " <> wrote in message <kiabef$bgo$>...
> emanuele <> wrote in message <ef1bf39.-1@webx.raydaftYaTP>...
> > Hi all
> > how can generate random integer numbers?
> > Thanks in advantage Emanuele

> Well, you can use randint function
> eg: to get uniform random integer vector of (1x10) with random number 1 to 1000
> test = randint(1,10,[1 1000])

I would use randi function.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.