Matrix Indexing with respect to sum of matrix raws

조회 수: 1 (최근 30일)
Usman Taya
Usman Taya 2019년 6월 20일
댓글: Rena Berman 2019년 7월 8일
A =
-9 3 -1 9
-4 0 1 -2
-2 5 6 -9
I want to sort it and want to get following result after sort matrix A kindly let me know how i can get following results:
A =
-4 0 1 -2
-2 5 6 -9
-9 3 -1 9
Here matrix A is sort based of sum of each row.
  댓글 수: 2
madhan ravi
madhan ravi 2019년 6월 20일
No!!!! Don’t edit the question after someone has answered the question!
Rena Berman
Rena Berman 2019년 7월 8일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

채택된 답변

madhan ravi
madhan ravi 2019년 6월 20일
편집: madhan ravi 2019년 6월 20일
1) Sum A with respect to rows.
2) Use sort() for sum of rows and collect the second output of it.
3) Use the second output of sort() as the row indices of A.
  댓글 수: 3
madhan ravi
madhan ravi 2019년 6월 20일
편집: madhan ravi 2019년 6월 20일
No it’s your homework not mine sorry.
doc sum
doc sort
Usman Taya
Usman Taya 2019년 6월 20일
Thanks.
I have done it

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by