Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = 1;
assert(isequal(reverseVector(x),y_correct))
b =
1
|
2 | Pass |
x = -10:1;
y_correct = 1:-1:-10;
assert(isequal(reverseVector(x),y_correct))
b =
1
b =
1 0
b =
1 0 -1
b =
1 0 -1 -2
b =
1 0 -1 -2 -3
b =
1 0 -1 -2 -3 -4
b =
1 0 -1 -2 -3 -4 -5
b =
1 0 -1 -2 -3 -4 -5 -6
b =
1 0 -1 -2 -3 -4 -5 -6 -7
b =
1 0 -1 -2 -3 -4 -5 -6 -7 -8
b =
1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9
b =
1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10
|
3 | Pass |
x = 'able was i ere i saw elba';
y_correct = 'able was i ere i saw elba';
assert(isequal(reverseVector(x),y_correct))
b =
'a'
b =
'ab'
b =
'abl'
b =
'able'
b =
'able '
b =
'able w'
b =
'able wa'
b =
'able was'
b =
'able was '
b =
'able was i'
b =
'able was i '
b =
'able was i e'
b =
'able was i er'
b =
'able was i ere'
b =
'able was i ere '
b =
'able was i ere i'
b =
'able was i ere i '
b =
'able was i ere i s'
b =
'able was i ere i sa'
b =
'able was i ere i saw'
b =
'able was i ere i saw '
b =
'able was i ere i saw e'
b =
'able was i ere i saw el'
b =
'able was i ere i saw elb'
b =
'able was i ere i saw elba'
|
The Hitchhiker's Guide to MATLAB
2874 Solvers
351 Solvers
Find the maximum number of decimal places in a set of numbers
734 Solvers
Switch matrix to a column vector
260 Solvers
583 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!