Am I doing something wrong in cody submission?
2 views (last 30 days)
Show older comments
I have solved couple of question on cody and cross checked my prog on matlab which showing exactly the same output which the question in cody needs. But everytime, its showing error in submission. I have attached the sample submission problem.
0 Comments
Accepted Answer
Stephen23
on 5 Oct 2018
Edited: Stephen23
on 5 Oct 2018
Your function returns y, which is just the index from sort and has nothing to do with the first column of x.
The code x([y],1) is not allocated to anything, so it will be discarded.
Note that the square brackets around y are totally superfluous:
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!