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
|
Find the alphabetic word product
2321 Solvers
261 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1491 Solvers
Determine Whether an array is empty
646 Solvers
266 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!