What is the meaning of [B,J]=sort(A,'descend')?

2 Ansichten (letzte 30 Tage)
zhenyu zeng
zhenyu zeng am 2 Apr. 2019
Bearbeitet: Stephen23 am 2 Apr. 2019
What is the meaning of [B,J]=sort(A,'descend')
Why can he use [B,J] here?
  1 Kommentar
Stephen23
Stephen23 am 2 Apr. 2019
Bearbeitet: Stephen23 am 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:

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by