Fitting 3d data

조회 수: 9 (최근 30일)
Bhar_tex
Bhar_tex 2018년 3월 1일
댓글: Torsten 2018년 3월 1일
I have a nonlinear 3D data. Can someone help in providing me a function that fits my data? I would like to use that function for interpolation/extrapolation. Appreciate your help.

답변 (1개)

Torsten
Torsten 2018년 3월 1일
I suggest you interpolate directly from the data:
https://de.mathworks.com/help/matlab/ref/scatteredinterpolant.html
Best wishes
Torsten.
  댓글 수: 2
Bhar_tex
Bhar_tex 2018년 3월 1일
I am confused how to use function, F (= scatteredInterpolant(x,y,z)) for interpolation. i.e., if I have xnew,ynew and how can I predict corresponding znew using this F?
Torsten
Torsten 2018년 3월 1일
Put your first column in vector x, your second column in vector y and your third column in vector z.
Then call
F = scatteredInterpolant(x,y,z);
For a query point (xq,yq)
zq = F(xq,yq)
gives you the interpolated z-value.
Best wishes
Torsten.

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

카테고리

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