what is the best possible way to find the missing values using interpolation

1 次查看(过去 30 天)
Hi all,
i have an array that is measured in a hour interval.
ex) a_1_hour = [ 1 5 9 13 17 21 ]
but i wish to find out how the values would be if it was a measurement taken in 15-minutes interval.
ex) a_15_min = [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ]
I have presented a linear increase for the sake of easy demonstration. However, the actual values do not increase/decrease linearly.
What is the best possible way to interpolate the unknow 15-minutes interval values?
thanks

回答(1 个)

Stephen23
Stephen23 2020-7-30
>> a60 = [1,5,9,13,17,21];
>> t60 = 60*(0:numel(a60)-1);
>> t15 = t60(1):15:t60(end);
>> a15 = interp1(t60,a60,t15)
a15 =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by