I have a cell variable 201624x1 with values for date from '01/01/1994 01' until '01/01/1994 01' How do I convert these into Matlab dates
Thanks

3 件のコメント

Jan
Jan 2017 年 7 月 3 日
It depends on what "from '01/01/1994 01' to '01/01/1994 01'" means. Why are the two strings equal and what is the trailing "01"?
Johannes Deelstra
Johannes Deelstra 2017 年 7 月 3 日
sorry this was wrong. the time series starts at 01/01/1994 01 in which the 01 is 1 o' clock and ends at 31/12/2016 23 in which 23 is the 24 hrs midnight
per isakson
per isakson 2017 年 7 月 4 日
編集済み: per isakson 2017 年 7 月 4 日

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

 採用された回答

Guillaume
Guillaume 2017 年 7 月 4 日

2 投票

datetime(yourcellarray, 'InputFormat', 'dd/MM/yyyy HH')

その他の回答 (1 件)

Anushi1998
Anushi1998 2017 年 7 月 4 日

0 投票

Use strfun and datetime functions for conversion

1 件のコメント

Guillaume
Guillaume 2017 年 7 月 4 日
You probably mean cellfun. There is no strfun in base matlab. In any case, datetime can directly operate on a cell array so cellfun would not even be needed.

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

カテゴリ

ヘルプ センター および File Exchange で Dates and Time についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by