This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [1 2 4 6 0
9 8 0 0 0];
y_correct = [1 1 1 1 0
1 1 0 0 0];
assert(isequal(your_fcn_name(x),y_correct))
|
2 | Pass |
%%
x = [-1 2 NaN 6
3 7 0 0 ];
y_correct = [1 1 NaN 1
1 1 0 0 ];
assert(isequaln(your_fcn_name(x),y_correct))
|
1326 Solvers
1309 Solvers
How many trades represent all the profit?
520 Solvers
489 Solvers
2980 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!