Match different time series with one date vector

Hi Everyone,
I have many different matrices with one column containing dates and one comlumn containing numerical values.
I need one "Master Matrix" that contains one "Master date" vector and where each numerical value from the other matrices is assigned to the associated date. So in the new matrix each column represents one of the old matrices with only one date vector.
How could I do this?
Thank you very much in advance!

1 件のコメント

Jonas
Jonas 2021 年 5 月 2 日
i would start collecting all date columns and sort them chronologically and remove double entries (maybe using unique, but i dont know which fornat your date has). the resulting date vector gives you the number of rows of your master matrix. after that you can sort in your numerical vectors column by column and set these rows to NaN to which the data vector does not have a date

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

 採用された回答

Steven Lord
Steven Lord 2021 年 5 月 2 日

0 投票

Consider storing your time-based data as timetable arrays and use synchronize to synchronize the timetables to a specific date and/or time vector.

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

2021 年 5 月 2 日

編集済み:

2021 年 7 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by