I have two columns (same size) that I have to interpolate in Matlab. First column is a vector of time in hours (9.5, 9.6 9.73 10.13 etc…) and the other column are stock prices associated to each element of the column “time in hours”.
I wish to have some prices that are associated with each 15min, 30min, 45min, and 1hour (60min) that are missing in my price vector. And therefore, thee elements (15,30,45min and 60min) are also missing in my column of time per hours.
How can I linearly interpolate two columns in order to have the same size and then be able to associate a price at every 15min (X.25hour, X.5hour, X.75hour and X hour)?
Thank you!
It’s a one line command: