Array Aをソートしそれに合わせArray Bの順序を入れ換える
Show older comments
A = [2 4 5], B = [1.2 0.7 0.1]と与えられた2つのarrayが有ります。
Bは有る関数を元に、Aから生成された値です。
Bを昇順にsortし(結果[0.1 0.7 1.2]となる)、それに合わせarray-A要素順序を並び替える為の手順(code)を教えて下さい。
Aの並びは、[5 4 2]となるMatlabのcoding手法をお伺いしています。
Accepted Answer
More Answers (1)
madhan ravi
on 5 Jan 2019
sort(A,'descend')
sort(B,'descend')
Categories
Find more on 行列および配列 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!