Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Load csv with date-time column and other colums with numbers and changing date-time to number.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I have csv file of stock data that has around 5000 rows and looks like this:
timestamp,open,high,low,close,volume 2017-11-03,5.7000,5.9400,5.6300,5.7500,822395 2017-11-02,5.6100,5.8100,5.5500,5.7800,1120941 2017-11-01,5.4600,5.6300,5.4400,5.6200,717112
Now I would like to load it into matrix, but timestamps i would like to change to some number and then i would like to be able to easily transform this number back to timestamp.
0 comentarios
Respuestas (1)
KL
el 21 de Nov. de 2017
Editada: KL
el 21 de Nov. de 2017
If you have 2013b or later use readtable,
data = readtable('filename.csv');
your first column will have datetime format by default (if your data is properly formatted), you can modify a specific row by
data.timestamp(your_row) = some other date here
then you use writetable if you want to export the updated data to csv
writetable(data,'filename.csv');
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!