How to concatenate table columns into one columns
1 回表示 (過去 30 日間)
古いコメントを表示
I have a Matlab table with three columns: Year, Month, Day. I want to make it into one column that represents the date in a format 'MM/dd/yyyy'. How can I do that? I tried quite a while to no avail, but I believe someone may know it immediately. Thanks.
The Table T has 3 columns (Year, Month, Day) and 10 rows.
0 件のコメント
採用された回答
Andrei Bobrov
2015 年 8 月 7 日
編集済み: Andrei Bobrov
2015 年 8 月 7 日
T = [randi([2014 2016],10,1),randi([1 12],10,1),randi([1 28],10,1)];
out = datestr(datenum(T),'mm/dd/yyyy');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!