How to increase temporal resolution from 3-hourly to hourly data with interpolation?

4 views (last 30 days)
I have a dataset of temperatures measured at 3-hourly intervals which looks like this:
0 1.37660000000000
3 4.57660000000000
6 3.17660000000000
9 3.67660000000000
12 6.07660000000000
15 11.2770000000000
18 4.97660000000000
21 3.37660000000000
I want to upgrade the temporal resolution from 3-hourly to hourly with interpolation in between the data points.
For example:
0 1.37660000000000 <= original value
1 2.44326666666667 <= linear interpolation
2 3.50933336666667 <= linear interpolation
3 4.57660000000000 <= original value
4 4.10999999999993 <= linear interpolation
5 3.64326666666667 <= linear interpolation
6 3.17660000000000 <= original value
How can I do that? Thanks!

Answers (1)

Star Strider
Star Strider on 21 Dec 2021
If the Signal Processing Toolbox is available, the easiest way to do that is with the resample function.
.

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by