Random generator with constraints
Ältere Kommentare anzeigen
I am getting back into MATLAB and need to create a random generator that provides a matrix of 12 rows by 4 colums of numbers from (1,4), with non repeating numbers in row. And another separate random generator code that can provide a 1 row by 5 colums of numbers for (0,4), with non repeating numbers in row.
Akzeptierte Antwort
Weitere Antworten (1)
A = rand(6, 4);
[~, ind] = sort(A, 2)
Kategorien
Mehr zu Random Number Generation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!