Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 2;
y_correct = [0 0;
0 1;
1 0;
1 1];
assert(isequal(createTruthTable(x),y_correct))
ans =
'00'
ans =
'01'
ans =
'10'
ans =
'11'
|
2 | Fail |
x = 3;
y_correct = [0 0 0;
0 0 1;
0 1 0;
0 1 1;
1 0 0;
1 0 1;
1 1 0;
1 1 1];
assert(isequal(createTruthTable(x),y_correct))
ans =
'000'
ans =
'001'
ans =
'010'
ans =
'011'
ans =
'100'
ans =
'101'
ans =
'110'
ans =
'111'
|
220 Solvers
Back to basics 9 - Indexed References
392 Solvers
Duplicate each element of a vector.
518 Solvers
367 Solvers
Rounding off numbers to n decimals
1051 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!