why cannot generate the sequence of Years
Afficher commentaires plus anciens
>> s=datetime('2014','Format','y');
ss=datetime('2019','Format','y');
t1 =s:years(1):ss;
t2= s+ years(1:5);
%
disp(t1);
disp(t2);
2014 2015 2016 2016 2017
2015 2016 2016 2017 2019
1 commentaire
Dai Chao
le 4 Mai 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!