timerange in a loop
Mostra commenti meno recenti
is it possible to put dates into a loop used in timerange function?
for i=2012:2016;
s(i)=timerange('i-01-01','i-02-01')
end
Risposta accettata
Più risposte (2)
Sulaymon Eshkabilov
il 19 Ott 2019
Hi,
What about this:
for ii=2012:2016
H{ii-2011} = [num2str(ii), '-01-01',' : ', num2str(ii), '-02-01'];
end
Good luck.
Sulaymon Eshkabilov
il 19 Ott 2019
How about this way:
for ii=2012:2016
H{ii-2011,1} = [num2str(ii), '-01-01'];
H{ii-2011, 2}= [num2str(ii), '-02-01'];
end
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!