How to interpolate values
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello. I have the question about how would you interpolate some values. For example, I have:
x y z
1 4 7
3 6 9
I want a point between (1,4) and (3,6) with the mean value of z.
Thank you in advanced!!
댓글 수: 4
Matt Kindig
2013년 3월 7일
Do you just mean that you want the mean of the x, y, and z coordinates? If so, your middle point would simply be
mid = mean([x, y, z], 1);
Or are you asking something else?
채택된 답변
Sean de Wolski
2013년 3월 7일
There aren't enough points to perform a 2d scattered interpolation which requires a Delaunay Triangulation under the hood. Instead, just use interp1 twice:
interp1([1 4],[7 9],2.5)
or acquire more data (recommended).
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!