how to create a square matrix with unique real values?
1 view (last 30 days)
Show older comments
Hello, I want a random square matrix of size 10*10, where each row must contain random values from 1 to 10...
0 Comments
Accepted Answer
More Answers (1)
Jos (10584)
on 21 Feb 2018
Edited: Jos (10584)
on 21 Feb 2018
A very simple one-liner will do the trick:
N = 10 ;
[~, A] = sort(rand(N), 2)
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!