Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
s = '1001';
y_correct = '0110';
assert(all(isequal(flipbit(s),y_correct)&ischar(flipbit(s))))
k =
0 1 1 0
p =
0 1 1 0
i =
' ' ' ' ' ' ' ' ' ' ' '
j =
2 3 5 6 8 9
k =
0 1 1 0
p =
0 1 1 0
i =
' ' ' ' ' ' ' ' ' ' ' '
j =
2 3 5 6 8 9
|
2 | Pass |
%%
s = '11';
y_correct = '00';
assert(all(isequal(flipbit(s),y_correct)&ischar(flipbit(s))))
k =
0 0
p =
0 0
i =
' ' ' '
j =
2 3
k =
0 0
p =
0 0
i =
' ' ' '
j =
2 3
|
3 | Pass |
%%
s = '1';
y_correct = '0';
assert(all(isequal(flipbit(s),y_correct)&ischar(flipbit(s))))
k =
0
p =
0
i =
{}
j =
[]
k =
0
p =
0
i =
{}
j =
[]
|
4 | Pass |
%%
s = '100000001';
y_correct = '011111110';
assert(all(isequal(flipbit(s),y_correct)&ischar(flipbit(s))))
k =
0 1 1 1 1 1 1 1 0
p =
0 1 1 1 1 1 1 1 0
i =
Columns 1 through 14
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Columns 15 through 16
' ' ' '
j =
2 3 5 6 8 9 11 12 14 15 17 18 20 21 23 24
k =
0 1 1 1 1 1 1 1 0
p =
0 1 1 1 1 1 1 1 0
i =
Columns 1 through 14
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Columns 15 through 16
' ' ' '
j =
2 3 5 6 8 9 11 12 14 15 17 18 20 21 23 24
|
5 | Pass |
%%
s = '00001';
y_correct = '11110';
assert(all(isequal(flipbit(s),y_correct)&ischar(flipbit(s))))
k =
1 1 1 1 0
p =
1 1 1 1 0
i =
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
j =
2 3 5 6 8 9 11 12
k =
1 1 1 1 0
p =
1 1 1 1 0
i =
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
j =
2 3 5 6 8 9 11 12
|
501 Solvers
Find the largest value in the 3D matrix
1056 Solvers
"Low : High - Low : High - Turn around " -- Create a subindices vector
320 Solvers
224 Solvers
Find out sum of all elements of given Matrix
349 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!