필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Sehoon Chang
Sehoon Chang 2020년 7월 29일
답변: Stephen23 2020년 7월 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