sort data

5 次查看(过去 30 天)
Kugen Raj
Kugen Raj 2012-3-18
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?

采纳的回答

Walter Roberson
Walter Roberson 2012-3-18
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 个评论
Kugen Raj
Kugen Raj 2012-3-18
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..

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

尚未输入任何标签。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by