How to create Matrix of known dimensions with random values?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Prathamesh Walunj
am 24 Mai 2021
Beantwortet: Shivani Dixit
am 24 Mai 2021
For example A matrix with 5 rows and 3 columns?
0 Kommentare
Akzeptierte Antwort
Shivani Dixit
am 24 Mai 2021
A matrix of know dimensions and random values can be created by using the rand() function. You just need to provide the required dimension of row and column in the the rand() function. As per your example, you can create your matrix by rand(5,3)
You can leverage the Matlab documentation of the rand() function , you can also find out related functions in the link below :
0 Kommentare
Weitere Antworten (1)
Torsten
am 24 Mai 2021
For random numbers uniformly distributed on [0,1] :
A = rand(5,3);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!