sort data

5 visualizaciones (últimos 30 días)
Kugen Raj
Kugen Raj el 18 de Mzo. de 2012
i have an array of data with size of (1,361). I need to select and store all the data from (1,121) to (1,241) into anther array. How can i do this?

Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de Mzo. de 2012
newarray = oldarray(121:241);
I note that your title asks about "sort data", but I do not see any reference to sorting in your question?
  1 comentario
Kugen Raj
Kugen Raj el 18 de Mzo. de 2012
sorry about that, i forget to change the title...actually i wanted to ask how to sort data in an ascending manner..i found the answer..anyway thanks for this answer..

Iniciar sesión para comentar.

Más respuestas (1)

the cyclist
the cyclist el 18 de Mzo. de 2012
% Input
A = rand(1,361);
% Select and store
B = A(121:241);

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by