Clear Filters
Clear Filters

sort data

1 view (last 30 days)
Kugen Raj
Kugen Raj on 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?

Accepted Answer

Walter Roberson
Walter Roberson on 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 Comment
Kugen Raj
Kugen Raj on 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..

Sign in to comment.

More Answers (1)

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

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!