Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first should be singleton.)
For example,
>> middleAsColumn(eye(3)) ans = 0 0 0 1 0 0 0
The test suite should include a two element input also, for the sake of completion!
Why are several y_correct vectors not column vector as required by the problem?
The leading solution without the regexp hack: 19.
363 Solvers
Find the sum of the elements in the "second" diagonal
879 Solvers
Getting the absolute index from a matrix
176 Solvers
392 Solvers
264 Solvers