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

 Respuesta aceptada

madhan ravi
madhan ravi el 8 de Ag. de 2019

0 votos

Use sort() and fprintf().

2 comentarios

PRAVEEN GUPTA
PRAVEEN GUPTA el 8 de Ag. de 2019
fprintf will not give : "X(1)"
fprintf will give value of X(1)..??
madhan ravi
madhan ravi el 8 de Ag. de 2019
Yes, use compose().

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

el 8 de Ag. de 2019

Comentada:

el 8 de Ag. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by