Am I doing something wrong in cody submission?
1 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197056/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197057/image.jpeg)
0 个评论
采纳的回答
Stephen23
2018-10-5
编辑:Stephen23
2018-10-5
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:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!