sort data

1 Ansicht (letzte 30 Tage)
Kugen Raj
Kugen Raj am 18 Mär. 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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Mär. 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 Kommentar
Kugen Raj
Kugen Raj am 18 Mär. 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..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

the cyclist
the cyclist am 18 Mär. 2012
% Input
A = rand(1,361);
% Select and store
B = A(121:241);

Kategorien

Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by