datetime配列と数値配列の列方向を結合する方法
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
koji adachi
le 20 Juin 2018
Réponse apportée : Akira Agata
le 20 Juin 2018
datetime配列と数値配列の列方向を結合する方法が分かりません。宜しくお願いします。
0 commentaires
Réponse acceptée
Akira Agata
le 20 Juin 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
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!