sorting a matrix by another matrix

조회 수: 1 (최근 30일)
Berfin Çetinkaya
Berfin Çetinkaya 2022년 5월 19일
답변: David Hill 2022년 5월 19일
For example we have a matrix A matrix
1 2 3 4 5
0.1 0.9 0.2 0.7 0.5
0.3 0.2 0.7 0.4 0.9
and there is one more matrix
3 5 4 1 2 Let's call this matrix B
Can we sort matrix A by B?
3 5 4 1 2
0.2 0.5 0.7 0.1 0.9
0.7 0.9 0.4 0.3 0.2
like this

답변 (1개)

David Hill
David Hill 2022년 5월 19일
A(:,B)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by