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
3098 Solvers
Get the elements of diagonal and antidiagonal for any m-by-n matrix
274 Solvers
Replace multiples of 5 with NaN
362 Solvers
Fahrenheit to Celsius converter
363 Solvers
525 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!