Using gridfit to compute data for a hill chart
9 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
smoothing a surface with the gridfit function found on FEX here seemed to me like a good way to "clean" up data in order to generate a clear hill chart. However gridfit extrapolates the data to the grid boundries, so the generated contour plot doesnt really look like its supposed to.
Is there a way to still use the smoothing of gridfit without extrapolating to the grid boundries? For example, this first image shows the mesh generated using Matlabs own meshgrid and griddata functions.
The next image shows the result of using gridfit with the exact same inputs.
As you can see, the 2nd mesh is not useable for a contour plot. So is there a way to use gridfit without extrapolating to the edges of the grid nodes, only smoothing the existing x,y,z values? I'm still somewhat new to Matlab and maybe I've just used the inputs/options in a wrong way?
Thanks for your help!
0 个评论
采纳的回答
John D'Errico
2017-8-9
编辑:John D'Errico
2017-8-9
Gridfit is designed to extrapolate, and to do so as smoothly as possible. That is how it is written, and you will not change it. There are no settings you can change in this matter. Sorry.
gridfit works on a rectangular lattice in the (x,y) plane. With a bit of programming expertise, you could triangulate that lattice, then carefully deal with those triangles that cross the convex hull. The result will be a new triangulation that lies entirely inside the convex hull of the data. It would take some work on your part though, and an understanding of how triangulations can be manipulated.
I can think of two other viable schemes to solve the problem. But if you insist on using a tool that will smooth the surface within the convex hull, then it will take some effort on your part.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!