How to adapt interpolated 3D surfaces to the boundary of 2D data ?

1 次查看(过去 30 天)
The MatLab FIT function sf=fit([x y],z); plot(sf,[x y],z) is very useful for estimating 3D surfaces. However, in the case of sparse data and polynomial fitting, It generates interpolates that are unsuitable outside the 2D data boundary. My question is "how to trim (cut) the parts of surface that are outside the 2D boundary". Here, an example of unsuitable border fitting ...

回答(1 个)

KSSV
KSSV 2017-8-24
doc griddata , scatteredinterpolant
  2 个评论
Rosanna
Rosanna 2017-8-24
I would like solve the problem with the output of the FIT function (which has much more estimation options). I also tried to use k=boundary(x,y) and plot(sf(k),[x(k) y(k)],z(k)) ... but It does not work
Rosanna
Rosanna 2017-8-25
Apart from the fact that "scatteredInterpolant" does not perform surface trimming outside of the data boundary ... rather, its older version "TriScatterInterp" (which will be dismissed by Matlab) does perform trimming ... hence, Why worsening this function?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Least Squares 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by