Using gridfit to compute data for a hill chart

9 visualizaciones (últimos 30 días)
Ingo Rück
Ingo Rück el 9 de Ag. de 2017
Comentada: Ingo Rück el 15 de Ag. de 2017
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!

Respuesta aceptada

John D'Errico
John D'Errico el 9 de Ag. de 2017
Editada: John D'Errico el 9 de Ag. de 2017
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.
  1 comentario
Ingo Rück
Ingo Rück el 15 de Ag. de 2017
Thats too bad, but it was worth a shot. I'm still fairly new to matlab, so trying to modify a big function like this is probably beyond my current skill level. Thanks for the advice!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by