Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
N = [1 3 2 7];
IDX= [2 3 4 6];
y_correct = [0 1 3 2 0 7];
assert(isequal(reindex_a_vector(N,IDX),y_correct))
|
2 | Pass |
N=[ -1 0 4 2];
IDX=[3 8 1 6];
y_correct = [4 0 -1 0 0 2 0 0];
assert(isequal(reindex_a_vector(N,IDX),y_correct))
|
3 | Pass |
N=[-1 0 4 2]';
IDX=[3 8 1 6];
y_correct = [4 0 -1 0 0 2 0 0]';
assert(isequal(reindex_a_vector(N,IDX),y_correct))
|
4 | Pass |
N=[1 2 3 4 5 6 7 8 9 10];
IDX=[3 4 5 6 7 8 9 10 11 13];
y_correct=[0 0 1 2 3 4 5 6 7 8 9 0 10];
assert(isequal(reindex_a_vector(N,IDX),y_correct))
|
732 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1018 Solvers
Implement simple rotation cypher
943 Solvers
Magic is simple (for beginners)
2749 Solvers
4999 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!