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.5242 0.3854 0.7574 0.0085 0.3259
|
2 | Pass |
%%
x = rand(1,100);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
y =
Columns 1 through 6
0.7846 0.3131 0.5424 0.1076 0.7813 0.4015
Columns 7 through 12
0.3241 0.8243 0.1454 0.4890 0.0866 0.7362
Columns 13 through 18
0.5925 0.8790 0.5627 0.2703 0.5497 0.7132
Columns 19 through 24
0.2306 0.4648 0.9109 0.9471 0.8471 0.1191
Columns 25 through 30
0.4340 0.2113 0.0771 0.6552 0.9155 0.8702
Columns 31 through 36
0.6844 0.0370 0.4770 0.2907 0.9753 0.0100
Columns 37 through 42
0.4158 0.4114 0.2056 0.2029 0.5832 0.2573
Columns 43 through 48
0.0655 0.8037 0.3880 0.2282 0.0449 0.8423
Columns 49 through 50
0.4289 0.5265
|
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
|
What is the next step in Conway's Life?
422 Solvers
Determine if a Given Number is a Triangle Number
286 Solvers
Find perfect placement of non-rotating dominoes (easier)
228 Solvers
241 Solvers
Write c^3 as sum of two squares a^2+b^2
243 Solvers