Help needed on Date Strings.....
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I'm trying to Convert a date string to a serial date number using the default pivot year. I'm able to do it by entering each date at once. But how do i find out for a range of dates (say, from 15-Mar-2013 to 14-Mar-2012), And i also want to save the resulting Column vector.
datenum('10/31/2012')
ans =
735173
댓글 수: 0
답변 (2개)
Azzi Abdelmalek
2013년 3월 19일
편집: Azzi Abdelmalek
2013년 3월 19일
dates=datenum('14/Mar/2012'):datenum('15/Mar/2013')
댓글 수: 0
Peter Perkins
2013년 3월 19일
Nitin, If you have a list of date strings, then you can put them in a cell array:
datenum({'10/31/2012' '11/302012' '12/29/2012'})'
If you want them equally-spaced, then something like what Azzi suggested is the easiest way.
댓글 수: 0
이 질문은 마감되었습니다.
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!