how to arrenge timeseries data ?

hi. I have created a mat file(attached). Here first column is date and second column is data.
dates here are poorly arranged.like as follow.
01-Apr-2012
01-Apr-2013
01-Apr-2014
01-Apr-2015
01-Apr-2016
.
.
.
.
01-Jul-2013
01-Jul-2014
01-Jul-2015
01-Jul-2016
01-Jun-2012
01-Jun-2013
01-Jun-2014
01-Jun-2015
01-Jun-2016
01-Mar-2012
01-Mar-2013
.
.
.
01-Oct-2014
01-Oct-2015
01-Sep-2012
01-Sep-2013
01-Sep-2014
01-Sep-2015
I want here data monthly arranged from Jan to December, from 2012 to 2015. any idea how to make it possible.? hope you understand.

 採用された回答

KL
KL 2017 年 11 月 26 日

1 投票

use sort?
[~,indx] = sort(data(:,1));
sortedData = data(indx,:);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeTime Series についてさらに検索

タグ

質問済み:

2017 年 11 月 26 日

回答済み:

KL
2017 年 11 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by