Cody

# Problem 43739. Repeat Vector Values an Arbitrary Number of Times

Solution 1076163

Submitted on 7 Dec 2016 by Peng Liu
• Size: 12
• This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x1=[1 2 3 4 5 6]; x2=[2 2 1 1 2 2]; out=[1 1 2 2 3 4 5 5 6 6]; assert(isequal(your_fcn_name(x1,x2),out))

2   Pass
x1=1; x2=7; out=[1 1 1 1 1 1 1]; assert(isequal(your_fcn_name(x1,x2),out))

3   Pass
x1=1:650; x2=ones(1,650); out=1:650; assert(isequal(your_fcn_name(x1,x2),out))

4   Pass
x1=5.*ones(250,1); x2=3.*ones(250,1); out=5.*ones(750,1); assert(isequal(your_fcn_name(x1,x2),out))

5   Pass
x1=[1 500 32 780 5 8]; x2=[7 6 5 4 3 2]; out=[1,1,1,1,1,1,1,500,500,500,500,500,500,32,32,32,32,32,780,780,780,780,5,5,5,8,8]; assert(isequal(your_fcn_name(x1,x2),out))

### Community Treasure Hunt

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

Start Hunting!