필터 지우기
필터 지우기

How to use a cloud of points to interpolate the value at a given point?

조회 수: 2 (최근 30일)
Tyler
Tyler 2018년 10월 24일
댓글: Tyler 2018년 10월 25일
I have a point cloud matrix A with columns 1,2,3,4 equal to X,Y,Z (locations) and Value
I have a point B (xq,yq,zq) that i want to evaluate using the point cloud A.
I have tried using
vq = griddata(A(:,1),A(:,2),A(:,3),A(:,4),B(1),B(2),B(3))
with the error: ??? Error using ==> griddata at 72 METHOD must be one of 'linear','cubic','nearest', or 'v4'.
and vq = griddata(A(:,1),A(:,2),A(:,3),A(:,4),B(1),B(2),B(3),'linear') with the error: ??? Error using ==> griddata Too many input arguments.
i tried creating vectors for the query point (B), where i just filled below with some zeros to see if that would work, but it did not.
Any idea how i can accomplish this? Is griddata the right function?

답변 (1개)

John D'Errico
John D'Errico 2018년 10월 24일
편집: John D'Errico 2018년 10월 24일
You were close.
griddata is there for problems of the form z(x,y), thus two independent variables. You have three. That is why griddata gave a hiccup, since you tried to pass in too many arguments.
Use scatteredInterpolant instead, a function designed to work on higher dimensional problems.
  댓글 수: 1
Tyler
Tyler 2018년 10월 25일
Is scatteredInterpolant available in 2010b, or does it require an additional license / toolbox? I tried to use it without success

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

제품


릴리스

R2010b

Community Treasure Hunt

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

Start Hunting!

Translated by