フィルターのクリア

how to group rows by date

1 回表示 (過去 30 日間)
Amr Hashem
Amr Hashem 2015 年 5 月 23 日
コメント済み: Amr Hashem 2015 年 8 月 24 日
i have this data
i want to group\sort them to be something like this:
how i can do this ?

採用された回答

Andrei Bobrov
Andrei Bobrov 2015 年 5 月 23 日
編集済み: Andrei Bobrov 2015 年 5 月 23 日
[~,~,z] = xlsread('20150523.xlsx');
c = z(cellfun('isempty',regexp(z,'\')));
[y,~] = datevec(c);
[~,~,c0] = unique(y);
c1 = accumarray(c0,(1:numel(c0))',[],@(ii){c(ii)});
c2 = [c1,repmat({{[]}},size(c1))]';
out = cat(1,c2{1:end-1});
xlswrite('20150523.xlsx',out,1,'B1')
  3 件のコメント
Andrei Bobrov
Andrei Bobrov 2015 年 5 月 23 日
corrected
Amr Hashem
Amr Hashem 2015 年 8 月 24 日
Thanks... its amazing

サインインしてコメントする。

その他の回答 (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