Is it possible to replace a value in date vector in MATLAB?

2 ビュー (過去 30 日間)
Gazi Alam
Gazi Alam 2019 年 6 月 20 日
コメント済み: Gazi Alam 2019 年 6 月 20 日
HI, I am interested to replace "NaT" of a date vector in MATLAB. It does not allow me to do it. Is there any tric to do it? More clearly I have a vetor of Dates of the year without the year. Ex: T=[0101 0102 0103 ...... 1230 12 31] of length 366. But the erlement 0229 shows as NaT without year. I want to replace it like
T(60)=0229;
Since T is a date vector, it does not allow me to do it. Is there any tric to do it?
Thanks in advance.
  2 件のコメント
KSSV
KSSV 2019 年 6 月 20 日
Convert the value with which you want to replace to class datetime.
Gazi Alam
Gazi Alam 2019 年 6 月 20 日
Thanks, it works now.

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

回答 (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