Every time again, it's pretty amazing, to see what powerfull little functions are implemented in Matlab!
You can do this with one function call. See the mode flag in sort().
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [0,1,2,3,4];
y_correct = [4,3,2,1,0];
assert(isequal(desSort(x),y_correct))
y =
4 3 2 1 0
|
1900 Solvers
485 Solvers
2538 Solvers
Relative ratio of "1" in binary number
392 Solvers
2857 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!