Silly question:
How do I create a time vector from scratch, say beginning in 1981 and ending in 2010?
Thanks

댓글 수: 2

Jan
Jan 2013년 7월 8일
It depends on what a "time vector" is.
per isakson
per isakson 2013년 7월 8일
편집: per isakson 2013년 7월 8일
Is your question related to Time Series Basics in Matlab?

댓글을 달려면 로그인하십시오.

 채택된 답변

Jan
Jan 2013년 7월 8일

3 개 추천

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

Kate
Kate 2013년 7월 9일
Exactly. Thanks a bunch.
pruth
pruth 2018년 5월 21일
hi, and what if I want this time vector with 1 min interval.? how to make it possible?
Kate
Kate 2018년 5월 21일
If you add another number after the 1 or 31 it would be a minute vector, then you can just extract that.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Dates and Time에 대해 자세히 알아보기

제품

태그

질문:

2013년 7월 8일

댓글:

2018년 5월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by