フィルターのクリア

Excel Date Format to Matlab Number Array

2 ビュー (過去 30 日間)
Franco
Franco 2013 年 2 月 27 日
I have excel data, of which one column is in excel date format of the type '02/12/2013'. When I use xlsread, matlab gives me a number. I need to get matlab to give me an array. For instance, if 2 cells contain '02/03/2013' and '02/04/2013', I want matlab to give me an array of the following type, [02,02;03,04;2013,2013]. Anyone out there know how to do that? Thanks in advance.

採用された回答

Craig Cowled
Craig Cowled 2013 年 2 月 27 日
Have you tried using datevec?
Take one of the cells as an example ... '02/03/2013'.
>> datevec('02/03/2013','mm/dd/yyyy')
ans =
2013 2 3 0 0 0
  1 件のコメント
Franco
Franco 2013 年 2 月 28 日
Worked...Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by