Borrar filtros
Borrar filtros

How can I Repeat time data for a number of days

1 visualización (últimos 30 días)
Mohammad Sayeed
Mohammad Sayeed el 26 de Mzo. de 2015
Comentada: Star Strider el 30 de Mzo. de 2015
Hi Guys, I have generated a column vector of one minutes interval time (So I have 1440 rows of time). Now I need repeat the times for 2490 days as I have 2490 trading days in my data set. So my output will be a column that contains 1440 time (from 12.00 AM to 11.59 PM) 2490 times. So total length of the column will be 1440*2490=3585600. Anyone can help plz?

Respuesta aceptada

Star Strider
Star Strider el 26 de Mzo. de 2015
Use repmat:
T = [1:1440]'; % Column Vector Of Minutes
Days = 2490; % Days To Replicate
Tv = repmat(T, Days, 1); % Time Vector (3585600x1)
  7 comentarios
Mohammad Sayeed
Mohammad Sayeed el 30 de Mzo. de 2015
Thank you @Star. It is indeed very helpful. Thank you again.
Star Strider
Star Strider el 30 de Mzo. de 2015
Again, my pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by