Cody

Problem 43491. Delete x value in given vector y.

Solution 2739766

Submitted on 25 Jul 2020 by Ramesh Kumar V
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
x = 1; y = [ 1 2 1 2 5 2 5 5] y_correct = [2 2 5 2 5 5]; assert(isequal(Deleting(x,y),y_correct))

y = 1 2 1 2 5 2 5 5 ind = 1×8 logical array 1 0 1 0 0 0 0 0 z = 1 3 y = 2 2 5 2 5 5

2   Pass
x = 12; y = [ 12 5 9 12 17 21 12 29 33 12] y_correct = [5 9 17 21 29 33 ]; assert(isequal(Deleting(x,y),y_correct))

y = 12 5 9 12 17 21 12 29 33 12 ind = 1×10 logical array 1 0 0 1 0 0 1 0 0 1 z = 1 4 7 10 y = 5 9 17 21 29 33