Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Load csv with date-time column and other colums with numbers and changing date-time to number.
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
KL
2017 年 11 月 21 日
編集済み: KL
2017 年 11 月 21 日
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 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!