The test suite is not enough because it does not contain any case that the number of consecutive true bits is exactly same as n.
This is exactly what I was looking for.
I knew strcmp gives the same functionality for char arrays, but it didn't occur to me I can simply use it for logicals and doubles.
Thanks
10469 Solvers
Create matrix of replicated elements
326 Solvers
381 Solvers
Find the sides of an isosceles triangle when given its area and height from its base to apex
506 Solvers
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
791 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!