I have a 302451×3 matrix with stock quotes (bid / offers). Timestamp (in seconds) is in the first column.
If the timestamp is the same for several quotes (the rows) i want to replace all the rows with this timestamp with 1 single row that has that particular timestamp and with the median of the bid / offers in the other columns.
For example the first 60 rows share the same timestamp (34287) and the bids range from 87.57 to 87.67. The median is 87.60.
How do i replace these 60 rows with 1 row where the timestamp 34287 is the value in the first column and this 87.60 median is the value in the second column?
Hope you understand
Best Answer