how to create a square matrix with unique real values?
Afficher commentaires plus anciens
Hello, I want a random square matrix of size 10*10, where each row must contain random values from 1 to 10...
Réponse acceptée
Plus de réponses (1)
Jos (10584)
le 21 Fév 2018
Modifié(e) : Jos (10584)
le 21 Fév 2018
A very simple one-liner will do the trick:
N = 10 ;
[~, A] = sort(rand(N), 2)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!