Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = false;
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
0
|
2 | Pass |
x = 2;
y_correct = true;
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
1
|
3 | Pass |
x = 11;
y_correct = false;
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
0
|
4 | Pass |
x = 22;
y_correct = true;
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
1
|
5 | Pass |
x = 13;
y_correct = false;
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
0
|
6 | Pass |
x = [56 117 8 24 44 33 15];
y_correct = [true false true true true false false];
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
1
y =
1 0
y =
1 0 1
y =
1 0 1 1
y =
1 0 1 1 1
y =
1 0 1 1 1 0
y =
1 0 1 1 1 0 0
|
7 | Fail |
x = [99 558 100; 101 6 4; 44 31 39];
y_correct = [false true true; false true true; true false false];
assert(isequal(your_fcn_name(x),y_correct))
y =
[]
y =
0
y =
0 0
y =
0 0 1
y =
0 0 1 1
y =
0 0 1 1 1
y =
0 0 1 1 1 0
y =
0 0 1 1 1 0 1
y =
0 0 1 1 1 0 1 1
y =
0 0 1 1 1 0 1 1 0
|
8 | Fail |
filetext = fileread('your_fcn_name.m');
assert(isempty(strfind(filetext, 'for')),'for command is forbidden')
assert(isempty(strfind(filetext, 'repelem')),'repelem command is forbidden')
assert(isempty(strfind(filetext, 'discretize')),'discretize command is forbidden')
assert(isempty(strfind(filetext, 'while')),'while command is forbidden')
assert(isempty(strfind(filetext, 'if')),'if command is forbidden')
|
6065 Solvers
246 Solvers
Rounding off numbers to n decimals
1051 Solvers
Flip the vector from right to left
2676 Solvers
Matlab Basics - Set unwanted parts of a vector to zero
197 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!