Repeat elements of a vector - MATLAB Cody - MATLAB Central

Problem 45188. Repeat elements of a vector

Difficulty:Rate

Repeat each elements of a given vector according to their values.

  • x=[1,2,1,3]
  • y=[1,2,2,1,3,3,3]

Solution Stats

87.1% Correct | 12.9% Incorrect
Last Solution submitted on Jun 12, 2025

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers51

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!