How can I write all month's last dates for a given period of time?
Mostrar comentarios más antiguos
Hello guys. Well I have daily time series form 1990-2015
% code
b=726867;
a=9125;
for i=1:a
b=b+1;
BigMatrix(i,1)=b;
end
BigMatrix=cellstr(datestr(BigMatrix));
Now I want to make another variable where I have only last date of months for a same period of time.
Thanks in advance
Respuesta aceptada
Más respuestas (2)
Sean de Wolski
el 28 de En. de 2015
0 votos
You could use lbusdate to get the last business day of the month specifying no weekend days:
weekend = zeros(1,7); % that's depressing :)
web(fullfile(docroot, 'finance/lbusdate.html'))
Andrei Bobrov
el 28 de En. de 2015
BigMatrix = cellstr(datestr(b+(1:a)'));
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!