datetime配列​と数値配列の列方向を​結合する方法

16 Ansichten (letzte 30 Tage)
koji adachi
koji adachi am 20 Jun. 2018
Beantwortet: Akira Agata am 20 Jun. 2018
datetime配列と数値配列の列方向を結合する方法が分かりません。宜しくお願いします。

Akzeptierte Antwort

Akira Agata
Akira Agata am 20 Jun. 2018
datetime型と数値配列ではデータ型が異なるため、tableとして両方を保持するのが良いかと思います。
Time = [datetime(2018,6,20):days(1):datetime(2018,6,29)]';
Value = rand(10,1);
T = table(Time,Value); % テーブル型変数としてdatetime配列と数値配列を結合
上記の実行結果は以下のとおりです。
>> T
T =
10×2 table
Time Value
__________ _______
2018/06/20 0.81472
2018/06/21 0.90579
2018/06/22 0.12699
2018/06/23 0.91338
2018/06/24 0.63236
2018/06/25 0.09754
2018/06/26 0.2785
2018/06/27 0.54688
2018/06/28 0.95751
2018/06/29 0.96489

Weitere Antworten (0)

Kategorien

Mehr zu 日付と時刻 finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!