How to sort a set of data according to the ascending order with time?

1 回表示 (過去 30 日間)
aneps
aneps 2014 年 4 月 24 日
編集済み: the cyclist 2014 年 4 月 24 日
I have a data with three columns (X, Y and Time). This data is recorded for many different cycle of experiments. When the cycle starts, the time is zero. Like that many cycles. I want to sort the whole data according to the ascending order of time. For example if my data for two cycle is (X, Y and Time columns):
1 1 0
2 2 1
3 3 2
4 4 3
2 3 0
4 5 1
6 5 2
7 8 3
I want to sort such that:
1 1 0
2 3 0
2 2 1
4 5 1
3 3 2
6 5 2
4 4 3
7 8 3

採用された回答

the cyclist
the cyclist 2014 年 4 月 24 日
編集済み: the cyclist 2014 年 4 月 24 日
sortrows(data,[3])
See the documentation for sortrows for details.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by