How to interpolate between two sets of data
이전 댓글 표시
Good day all,
Please i have been trying to interpolate my experimental and predicted data set in matlab but all to no avail .
experimental predicted
966 1033
1072 1051
1144 1062
1186 1070
1200 1077
1191 1087
My wish is actually to have value that fall in between the experimental and predicted data.
Thank you
답변 (3개)
Star Strider
2019년 1월 12일
I am not exactly certain what result you want.
Try this:
% experimental predicted
D = [ 966 1033
1072 1051
1144 1062
1186 1070
1200 1077
1191 1087];
Result = [D(:,1), median(D,2), D(:,2)]
producing:
Result =
966 999.5 1033
1072 1061.5 1051
1144 1103 1062
1186 1128 1070
1200 1138.5 1077
1191 1139 1087
You could use either mean or median. I chose median here, because it calculates the exact midpoint.
Image Analyst
2019년 1월 12일
Pick the percentage of the way you want to be in between the values and then just do a weighted sum:
output = experimental + percentage * (predicted - experimental);
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!