how to create a square matrix with unique real values?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jyothi Alugolu
el 21 de Feb. de 2018
Editada: Jos (10584)
el 21 de Feb. de 2018
Hello, I want a random square matrix of size 10*10, where each row must contain random values from 1 to 10...
0 comentarios
Respuesta aceptada
Más respuestas (1)
Jos (10584)
el 21 de Feb. de 2018
Editada: Jos (10584)
el 21 de Feb. de 2018
A very simple one-liner will do the trick:
N = 10 ;
[~, A] = sort(rand(N), 2)
0 comentarios
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!