Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = rand(1,10);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
y =
0.7576 0.7273 0.8820 0.3426 0.5731
|
2 | Pass |
x = rand(1,100);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
y =
Columns 1 through 9
0.9661 0.0774 0.3049 0.5319 0.6412 0.4443 0.5802 0.8513 0.0730
Columns 10 through 18
0.8862 0.6207 0.3004 0.3688 0.2908 0.6952 0.1976 0.6772 0.4671
Columns 19 through 27
0.7917 0.0613 0.4990 0.1863 0.7078 0.0648 0.1457 0.9373 0.2504
Columns 28 through 36
0.4165 0.5759 0.4262 0.1431 0.8471 0.0008 0.7035 0.2402 0.9837
Columns 37 through 45
0.0869 0.5432 0.3910 0.5146 0.5199 0.8629 0.7282 0.0353 0.5725
Columns 46 through 50
0.2697 0.1763 0.6866 0.9922 0.3770
|
3 | Pass |
x = ['A' 'long' 'time' 'ago' 'in' 'a' 'galaxy' 'far' 'far' 'away'];
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
y =
Aogiegiaaayafrwy
|
605 Solvers
6280 Solvers
Solve the set of simultaneous linear equations
273 Solvers
Implement simple rotation cypher
943 Solvers
convert matrix to single column
306 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!