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))
s =
10
y =
0.9773
y =
0.9773 0.7011
y =
0.9773 0.7011 0.3182
y =
0.9773 0.7011 0.3182 0.8825
y =
0.9773 0.7011 0.3182 0.8825 0.7752
|
2 | Pass |
x = rand(1,100);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
s =
100
y =
0.6633
y =
0.6633 0.0321
y =
0.6633 0.0321 0.5687
y =
0.6633 0.0321 0.5687 0.8400
y =
0.6633 0.0321 0.5687 0.8400 0.7151
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734
y =
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Column 19
0.1129
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 20
0.1129 0.3017
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 21
0.1129 0.3017 0.6711
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 22
0.1129 0.3017 0.6711 0.3339
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 23
0.1129 0.3017 0.6711 0.3339 0.3996
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 24
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 25
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 26
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 27
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 28
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 29
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 30
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 31
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 32
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 33
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 34
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 35
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129 0.6880
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129 0.6880
Column 37
0.2280
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129 0.6880
Columns 37 through 38
0.2280 0.1184
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129 0.6880
Columns 37 through 39
0.2280 0.1184 0.3542
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 0.6711 0.3339 0.3996 0.1167 0.4212 0.1754 0.1966 0.0259 0.7880 0.0160 0.1826 0.6337 0.3573 0.5490 0.7129 0.6880
Columns 37 through 40
0.2280 0.1184 0.3542 0.1401
y =
Columns 1 through 18
0.6633 0.0321 0.5687 0.8400 0.7151 0.0693 0.4521 0.8701 0.3108 0.2336 0.2475 0.6658 0.6910 0.0337 0.8889 0.0778 0.0734 0.0941
Columns 19 through 36
0.1129 0.3017 ...
|
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))
s =
31
y =
'A'
y =
'Ao'
y =
'Aog'
y =
'Aogi'
y =
'Aogie'
y =
'Aogieg'
y =
'Aogiegi'
y =
'Aogiegia'
y =
'Aogiegiaa'
y =
'Aogiegiaaa'
y =
'Aogiegiaaay'
y =
'Aogiegiaaaya'
y =
'Aogiegiaaayaf'
y =
'Aogiegiaaayafr'
y =
'Aogiegiaaayafrw'
y =
'Aogiegiaaayafrwy'
|
1313 Solvers
Extract leading non-zero digit
967 Solvers
Compute a dot product of two vectors x and y
645 Solvers
Getting the row and column location from a matrix
192 Solvers
185 Solvers