Problem 760. Duplicate each element of a vector.

Created by Julio in Community

for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Example : in->[2 3 NaN 5] and out->[2 2 3 3 NaN NaN 5 5]

Solution Stats

63.79% Correct | 36.21% Incorrect
Last solution submitted on Mar 09, 2019

Solution Comments

Recent Solvers426

Suggested Problems

More from this Author10


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!