how to sort variable of an array?

let suppose we have 3 varaibles A=45, B=54,C=23 and we stores data in matrix M=[A B C] i want to sort on basis of their numerical value like M=[B A C] dont want to change it in numerical form

댓글 수: 1

Stephen23
Stephen23 2019년 9월 12일
편집: Stephen23 2019년 9월 13일
"how to sort variable..:"
Variables in the workspace do not have an "order", so variables cannot be "sorted".
Elements of an array have an order, so array elements can be sorted.
What exactly are you trying to achieve?

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

답변 (1개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

질문:

2019년 9월 12일

답변:

2019년 9월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by