displaying the sorted result

1 次查看(过去 30 天)
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)..??

请先登录,再进行评论。

更多回答(0 个)

类别

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