How do I create a vector with the first day of each month?
Mostrar comentarios más antiguos
How do I create a column vector with the first day of each month? Considering I have a list of days...
Respuesta aceptada
Más respuestas (1)
Jan
el 27 de Abr. de 2013
indata = datenum('10/01/1998'):datenum('06/31/1999');
dvec = datevec(data);
duniq = unique(dvec(:, 1:2), 'rows');
result = datenum(v(:,1), v(:,2), 1);
Now result contains a row vector of the serial date numbers of the first day of each month contained in the input data.
1 comentario
cfjunior
el 29 de Abr. de 2013
Categorías
Más información sobre Time Series Objects 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!