What is the meaning of [B,J]=sort(A,'descend')?
2 views (last 30 days)
Show older comments
What is the meaning of [B,J]=sort(A,'descend')
Why can he use [B,J] here?
1 Comment
Stephen23
on 2 Apr 2019
Edited: Stephen23
on 2 Apr 2019
"What is the meaning of [B,J]=sort(A,'descend')"
B = the sorted data.
J = the sort indices along the dimension sorted along.
'descend' = tells sort to sort the values into descending order.
"Why can he use [B,J] here?"
Because its author read the documentation:
Answers (0)
See Also
Categories
Find more on Shifting and Sorting Matrices 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!