Combining a Datetime matrix (8760 x 1) with another cell matrix (8760 x 2)

3 ビュー (過去 30 日間)
Tushar Agarwal
Tushar Agarwal 2016 年 10 月 3 日
コメント済み: Tushar Agarwal 2016 年 10 月 4 日
Hello, I have a data set of (8760 x 3)wherein a extracted just the first col of the data( in this format 'uuuu-MM-dd''T''HH:mm:ssXXX') to convert it to another format ('yyyy-MM-dd hh:mm:ss'). Thus I obtained a datetime matrix of (8760 x 1).
1. How do i replace this new format of datetime with the longer format (row 1 ) of my original file of cell matrix.
I get an error regarding the type of matrices, and that they cant be combined.
  1 件のコメント
Peter Perkins
Peter Perkins 2016 年 10 月 3 日
Tushar, I think you're going to need to give a specific, short example of what you're tyring to do.

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

採用された回答

Steven Lord
Steven Lord 2016 年 10 月 3 日
If you want your data stored in tabular form, and you're using release R2016b or later, consider storing your data in a timetable.
  1 件のコメント
Tushar Agarwal
Tushar Agarwal 2016 年 10 月 4 日
Thank you for taking out the time.
I am fairly new with this. What I mean to ask, is that how do I combine two matrices of different types.
One is a double matrix, and the other a datetime.
I am not able to combine the two with double(:,3)=datetime(:,1);
The error is All inputs must be datetimes or date/time strings.
I want to replace the 1st col of Data with col T.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by