datetime with certain number of rows
1 回表示 (過去 30 日間)
古いコメントを表示
I have a datetime array with 1000 rows.
I want to extend it to 1200 rows. The last 200 rows should be just a repetition of the last date.
How can I do this?
2 件のコメント
Samuele Sandrini
2020 年 4 月 9 日
編集済み: Samuele Sandrini
2020 年 4 月 9 日
We can do like this (is a little example):
A=datetime('now') %i create a variable datetime
A(2:201,1)=A(end,1)
Peter Perkins
2020 年 4 月 14 日
If you have a (column) vector, even simpler: A(end:(end+200)) = A(end)
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Numeric Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!