Reshape dataset with time intervals?
古いコメントを表示
I have a dataset with time(in seconds) in the first column and price for each time stamp in the second column. The increments in seconds are random, so i want to create 10 second time intervals in my data.
I then want to select the price from the data that lies the closest to the upper-limit of the time-interval, as the price value for that given interval. I have tried setting up a loop but i dont know how to tell matlab to choose the first value within each interval, as the position of this first value varies form interval to interval.
i.e.
time, price
4711, 192.30
4713, 192.32
4714, 192.31
4717, 192.34
4718, 192.30
Turned into:
time, price
4711-4715, 192.30
4716-4720, 192.34
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Financial Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!