sorting data with specific

2 Ansichten (letzte 30 Tage)
Takim Mustakim
Takim Mustakim am 2 Apr. 2023
Kommentiert: Takim Mustakim am 2 Apr. 2023
A=[5 4 3 2 1; 6 7 8 9 0] . How to sort A being A=[1 2 3 4 5; 0 9 8 7 6] ???

Akzeptierte Antwort

Stephen23
Stephen23 am 2 Apr. 2023
A = [5,4,3,2,1;6,7,8,9,0];
B = sortrows(A.').'
B = 2×5
1 2 3 4 5 0 9 8 7 6

Weitere Antworten (0)

Kategorien

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

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by