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.67% Correct | 72.33% Incorrect
Last solution submitted on Jan 31, 2019

Problem Comments

Solution Comments

Recent Solvers276

Suggested Problems

More from this Author11

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!