Creating a time vector
조회 수: 5 (최근 30일)
이전 댓글 표시
Silly question:
How do I create a time vector from scratch, say beginning in 1981 and ending in 2010?
Thanks
채택된 답변
Jan
2013년 7월 8일
It depends on what a "time vector" is. Perhaps a datenum vector with a step size of days?
v = datenum(1981, 1, 1):datenum(2010, 11, 31);
A similar approach works for a stepsize of seconds or hours etc.
댓글 수: 3
pruth
2018년 5월 21일
hi, and what if I want this time vector with 1 min interval.? how to make it possible?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!