Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [2; 3];
y_correct = [1; 0];
assert(isequal(calcTrend(x),y_correct))
|
2 | Pass |
%%
x = [2; 2];
y_correct = [1; 0];
assert(isequal(calcTrend(x),y_correct))
|
3 | Pass |
%%
x = [2; 2];
y_correct = [1; 0];
assert(isequal(calcTrend(x),y_correct))
|
4 | Pass |
%%
x = [2; 3; 0; 1; 2; 2; 1; 5; 6; 3];
y_correct = [1; 0; 1; 1; 1; 0; 1; 1; 0; 0];
assert(isequal(calcTrend(x),y_correct))
|
We love vectorized solutions. Problem 1 : remove the row average.
546 Solvers
376 Solvers
Sum the numbers on the main diagonal
453 Solvers
Returning a "greater than" vector
188 Solvers
2099 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!