Your solution is fastest so far.
Good job, Athi.
@Athi, your solution contains many "magic" constant variables that I don't know how you got.
William's solution is much easier to understood, although it is slower than yours.
Thanks li haitao.
233 Solvers
Create logical matrix with a specific row and column sums
171 Solvers
Create a vector whose elements depend on the previous element
392 Solvers
170 Solvers
14 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!