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
-
6566 Solvers
-
Arrange Vector in descending order
11886 Solvers
-
Getting the indices from a matrix
656 Solvers
-
918 Solvers
-
Return fibonacci sequence do not use loop and condition
688 Solvers
More from this Author13
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!