Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = [1 10 100];
a(1)=(((n(1)*3)+6)/3)-n(1);
a(2)=(((n(2)*2)+9)-3)/2-n(2);
a(3)=(((n(3)+7)*2)-4)/2-n(3);
y_correct = a;
assert(isequal(strange(n),y_correct))
|
2 | Pass |
n = [0 499 999];
a(1)=(((n(1)*3)+6)/3)-n(1);
a(2)=(((n(2)*2)+9)-3)/2-n(2);
a(3)=(((n(3)+7)*2)-4)/2-n(3);
y_correct = a;
assert(isequal(strange(n),y_correct))
|
3 | Pass |
n = [999 666 333];
a(1)=(((n(1)*3)+6)/3)-n(1);
a(2)=(((n(2)*2)+9)-3)/2-n(2);
a(3)=(((n(3)+7)*2)-4)/2-n(3);
y_correct = a;
assert(isequal(strange(n),y_correct))
|
4 | Pass |
n = [7 63 347];
a(1)=(((n(1)*3)+6)/3)-n(1);
a(2)=(((n(2)*2)+9)-3)/2-n(2);
a(3)=(((n(3)+7)*2)-4)/2-n(3);
y_correct = a;
assert(isequal(strange(n),y_correct))
|
Find the sum of all the numbers of the input vector
31951 Solvers
Sort a list of complex numbers based on far they are from the origin.
4327 Solvers
251 Solvers
Get the length of a given vector
3560 Solvers
Sum the numbers on the main diagonal
453 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!