Randomly initialise a matrix with numbers between 0 and 1?

41 visualizaciones (últimos 30 días)
Shubhang Sati
Shubhang Sati el 6 de Jun. de 2019
Respondida: Manvi Goel el 6 de Jun. de 2019
I want to initialise a 2*5 matrix with values between 0 and 1. Is there any easy way to do this?

Respuestas (1)

Manvi Goel
Manvi Goel el 6 de Jun. de 2019
You can initialise a random matrix with uniform distribution between 0 and 1 by the following:
randomMatrix = rand(2,5)
Screen Shot 2019-06-07 at 12.05.07 AM.png

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by