In the problem description a valid solution should also work for a 1-column matrix with more than one 1 row, like [4; 2]: "If the input has one column, the output should be identical to the input."
But solution 170924 submitted on 30 Nov 2012 (Size: 23, the leading solution) does not work in this case.
I wonder why such a case is not evaluated by the test suite.
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: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.