Cody

# Problem 1844. Create a v-notch vector without "sort" function

Solution 1925159

Submitted on 7 Sep 2019
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   Fail
vec = [ 10 2 3 89 5 7 90 0 12]; vNotch= [90 89 12 10 7 5 3 2 0 0 2 3 5 7 10 12 89 90]; assert(isequal(vNotchVector(vec),vNotch))

y = 0 2 3 5 7 10 12 89 90 90 89 12 10 7 5 3 2 0

Assertion failed.

2   Fail
vec = [ -8 -7 -6 -5 0 3 67 100 100 400]; vNotch= [400 100 100 67 3 0 -5 -6 -7 -8 -8 -7 -6 -5 0 3 67 100 100 400]; assert(isequal(vNotchVector(vec),vNotch))

y = -8 -7 -6 -5 0 3 67 100 100 400 400 100 100 67 3 0 -5 -6 -7 -8

Assertion failed.

3   Fail
vec= [1 0 1 0 1 0 1 0 1 0 1 0]; vNotch = [1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1]; assert(isequal(vNotchVector(vec),vNotch))

y = 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!