Cody

Problem 584. middleAsColumn: Return all but first and last element as a column vector

Created by Nicholas Howe in Community

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

Solution Stats

27.44% Correct | 72.56% Incorrect
Last solution submitted on Jul 15, 2019

Problem Comments

Solution Comments

Recent Solvers288

Suggested Problems

More from this Author11