Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
pos = 1;
y_correct = 1;
assert(isequal(wrapAround(x,pos),y_correct))
|
2 | Pass |
x = [1 2 3 4 5];
pos = 99;
y_correct = 4;
assert(isequal(wrapAround(x,pos),y_correct))
|
3 | Pass |
x = 7:101;
pos = 909;
y_correct = 60;
assert(isequal(wrapAround(x,pos),y_correct))
|
4 | Pass |
x = 5:5:100;
pos = 101;
y_correct = 5;
assert(isequal(wrapAround(x,pos),y_correct))
|
5 | Pass |
x = -17:3:99;
pos = 1001;
y_correct = 58;
assert(isequal(wrapAround(x,pos),y_correct))
|
6 | Pass |
x = 1:3:777;
pos = 789;
y_correct = 34;
assert(isequal(wrapAround(x,pos),y_correct))
|
1398 Solvers
3376 Solvers
Flip the main diagonal of a matrix
506 Solvers
Duplicate each element of a vector.
518 Solvers
Write a code that will follow the equation y = x * (x + x) * x.
211 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!