it is a good problem,but I cann't solve it
Only one verification test!? and this test already has the vector sorted.
li look up the options of the sort command
Needs (much) more tests in the Test Suite!! It would also be a good idea to include a randomly generated vector in the tests; for this random input, testing of the correct function output should be hard-coded as: assert(y(1)>=y(2)); assert(y(2)>=y(3)); ... ; assert(y(end-1)>=y(end)); [It's not the most efficient check, but anything else will risk giving away clues on possible solution codes.]
i comment for the challenge
comment = badge
I do not understand what is wrong with the solution?
I solved question with my algorithm
x=input(' give me input to obtain descending order of input')
y = zeros(size(x));
tried using the sort function in a descending order would not work
sort with direction
Find the treasures in MATLAB Central and discover how the community can help you!
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office