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

Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Created by Binbin Qi

Generate a vector like 1,2,2,3,3,3,4,4,4,4

So if n = 3, then return

 [1 2 2 3 3 3]

And if n = 5, then return

 [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5]

Tags

Problem Group

Solution Statistics

248 correct solutions 194 incorrect solutions
Last solution submitted on Dec 13, 2014

Problem Comments

Solution Comments