Creating a time vector

2 Ansichten (letzte 30 Tage)
Kate
Kate am 8 Jul. 2013
Kommentiert: Kate am 21 Mai 2018
Silly question:
How do I create a time vector from scratch, say beginning in 1981 and ending in 2010?
Thanks
  2 Kommentare
Jan
Jan am 8 Jul. 2013
It depends on what a "time vector" is.
per isakson
per isakson am 8 Jul. 2013
Bearbeitet: per isakson am 8 Jul. 2013
Is your question related to Time Series Basics in Matlab?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 8 Jul. 2013
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 Kommentare
pruth
pruth am 21 Mai 2018
hi, and what if I want this time vector with 1 min interval.? how to make it possible?
Kate
Kate am 21 Mai 2018
If you add another number after the 1 or 31 it would be a minute vector, then you can just extract that.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Time Series Objects finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by