Add ddmmm to the year column

1 ビュー (過去 30 日間)
Damith 2015 年 12 月 23 日
コメント済み: Walter Roberson 2015 年 12 月 24 日
I have a matrix "c" has year column and I need to add "31May" in front of each year in the column. So, the resulting array should look like below: (first two rows are shown). Note that years are not always in a sequence.
How can I achieve this in MATLAB.?
Thanks in advance.
31May1966 5261.9
31May1967 6003.5


Andrei Bobrov
Andrei Bobrov 2015 年 12 月 23 日
out = [arrayfun(@(x)sprintf('31May%d',x),c(:,1),'un',0),num2cell(c(:,2))];
  4 件のコメント
Walter Roberson
Walter Roberson 2015 年 12 月 24 日


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by