nice!this is the easiest way to translate to another language.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 2;
y_correct = [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1 1 1 1 1] ;
assert(isequal(your_fcn_name(x),y_correct))
|
2 | Pass |
%%
x = 3;
y_correct = [1 1 1 1 1 1 1 1 1; 1 2 2 2 2 2 2 2 1; 1 2 3 3 3 3 3 2 1; 1 2 3 2 2 2 3 2 1; 1 2 3 2 1 2 3 2 1; 1 2 3 2 2 2 3 2 1;1 2 3 3 3 3 3 2 1;1 2 2 2 2 2 2 2 1;1 1 1 1 1 1 1 1 1] ;
assert(isequal(your_fcn_name(x),y_correct))
|
3 | Pass |
%%
x = 1;
y_correct = [1];
assert(isequal(your_fcn_name(x),y_correct))
|
Determine whether a vector is monotonically increasing
9252 Solvers
298 Solvers
Sum all integers from 1 to 2^n
6323 Solvers
157 Solvers
Back to basics - mean of corner elements of a matrix
235 Solvers