sort data

5 visualizzazioni (ultimi 30 giorni)
Kugen Raj
Kugen Raj il 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?

Risposta accettata

Walter Roberson
Walter Roberson il 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 Commento
Kugen Raj
Kugen Raj il 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..

Accedi per commentare.

Più risposte (1)

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

Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by