This solution is outdated. To rescore this solution, sign in.
-
2 Comments
David Motson
on 12 Nov 2019
I discovered using a for loop doesn't work - too slow. Then I realised that randi can generate the required vector, doh!
Gabriel Gomes
on 19 Mar 2020
Can anyone do that in a size smaller than 22? That was the smallest size I could get.
Suggested Problems
-
890 Solvers
-
Convert a Cell Array into an Array
1932 Solvers
-
1485 Solvers
-
892 Solvers
-
8371 Solvers
More from this Author13
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!