sort data

1 vue (au cours des 30 derniers jours)
Kugen Raj
Kugen Raj le 18 Mar 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?

Réponse acceptée

Walter Roberson
Walter Roberson le 18 Mar 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 commentaire
Kugen Raj
Kugen Raj le 18 Mar 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..

Connectez-vous pour commenter.

Plus de réponses (1)

the cyclist
the cyclist le 18 Mar 2012
% Input
A = rand(1,361);
% Select and store
B = A(121:241);

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by