How do I create a vector with the first day of each month?
이전 댓글 표시
How do I create a column vector with the first day of each month? Considering I have a list of days...
채택된 답변
추가 답변 (1개)
Jan
2013년 4월 27일
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.
카테고리
도움말 센터 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!