displaying the sorted result

1 回表示 (過去 30 日間)
PRAVEEN GUPTA
PRAVEEN GUPTA 2019 年 8 月 8 日
コメント済み: madhan ravi 2019 年 8 月 8 日
hello,
i have an array with values "x=[12 34 45 67 82 32 32]", i have to arrange it in ascending order and then display it one by one as "X(1)=12", "X(2)=32"..
thanks in advance

採用された回答

madhan ravi
madhan ravi 2019 年 8 月 8 日
Use sort() and fprintf().
  2 件のコメント
PRAVEEN GUPTA
PRAVEEN GUPTA 2019 年 8 月 8 日
fprintf will not give : "X(1)"
fprintf will give value of X(1)..??
madhan ravi
madhan ravi 2019 年 8 月 8 日
Yes, use compose().

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by