More tests. A lot of solutions assume that mask has only 2 columns.
Good suggestion. I've added a couple more tests to the suite, including one that has three columns in the logical mask.
Is there a way to just view the solution to this? I've been trying to do this for my own work, and this problem is the only thing I've found that purports to do what I need, but of course it doesn't actually tell me how.
Find the peak 3n+1 sequence value
Replace NaNs with the number that appears to its left in the row.
Arrange Vector in descending order
Swap the input arguments
Back to basics 25 - Valid variable names
Right and wrong
The Hitchhiker's Guide to MATLAB
Figurate number triangle
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office