how to create a square matrix with unique real values?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jyothi Alugolu
am 21 Feb. 2018
Bearbeitet: Jos (10584)
am 21 Feb. 2018
Hello, I want a random square matrix of size 10*10, where each row must contain random values from 1 to 10...
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Jos (10584)
am 21 Feb. 2018
Bearbeitet: Jos (10584)
am 21 Feb. 2018
A very simple one-liner will do the trick:
N = 10 ;
[~, A] = sort(rand(N), 2)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!