Matlab : Create Random Data in Range

We can create random data in Matlab with command :

  • rand (Uniformly distributed pseudorandom numbers)
  • randn (Normally distributed random numbers)
  • unifrnd (Continuous uniform random numbers)
  • random (Random numbers)

If we want to create random data in range, we can use unifrnd function. Example :

unifrnd (1 , 10 , [5,1])

This command will create random data in range 1 to 10 with output row=5 and column=1.

One thought on “Matlab : Create Random Data in Range

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.