Borrar filtros
Borrar filtros

Interpolation of 3D surface

3 visualizaciones (últimos 30 días)
Catarina
Catarina el 8 de Abr. de 2011
Respondida: Swathi Chandrasekar el 17 de Mayo de 2017
Hi!
I have a data set in 3D, say x, y and z. I need to use these data points and fit/interpolate a 3D surface, I have used griddata, triscatteredinterp and interp2 but no method seems to work (as I would like). When I plot the data points and the constructed surface they don't fit, the data points seems to be ignored.
Is there another, a better way to do this? Please, let me know if you need more information or the data set.
Thanks in advance, Catarina
  2 comentarios
Matt Tearle
Matt Tearle el 8 de Abr. de 2011
The functions you mentioned are the right ones for fitting in 3-D. Can you show the code you've tried?
Catarina
Catarina el 11 de Abr. de 2011
Hi Matt,
I think the problem is within my data and use of function rather than code problem. The code is working but is not producing what I need.
//Catarina

Iniciar sesión para comentar.

Respuestas (2)

John D'Errico
John D'Errico el 8 de Abr. de 2011
Often this is really a problem of misuse. Those tools are designed for direct functional relationships, which could in theory be written as z = f(x,y), but where the function f is unknown. However, usually when I see this type of comment, that the interpolant failed to work, the person was trying to represent some multi-valued surface as a function. Thus, you cannot fit the surface of a sphere as a function, f(x,y).
At other times, the user tries to fit a surface to data that does not support a full surface. For example can you fit a surface to the data
x = 1:10; y = x; y = x + y;
NO!!!!!!!! This data lives on a line. It is insufficient to define a complete surface.
Next, if the data REALLY does represent a valid surface to be modeled, then the problem may be an issue of a surface that a triangulation deals poorly with. Perhaps the data represents a non-convex domain, or the user wants to extrapolate, or any of a variety of problems.
In order to know what is your problem, we need to see the data, to see what you tried. We cannot know what you would like without more help from you.
  3 comentarios
John D'Errico
John D'Errico el 11 de Abr. de 2011
Yes, you may send me the data to look at. It is best if you send me the actual data, rather than just a plot of it anyway, as then I may be able to offer several choices of how you might build a surface.
Nelson Ribeiro
Nelson Ribeiro el 17 de Mayo de 2013
Editada: Nelson Ribeiro el 17 de Mayo de 2013
Hello. I have the same problem. I have a set of pareto optimal solutions obtained from solving a multi objective optimization problem and I want to fit a 3D surface to the points. Catarina could you tell me any hints on how did you solved this problem?

Iniciar sesión para comentar.


Swathi Chandrasekar
Swathi Chandrasekar el 17 de Mayo de 2017
I may have had a similar problem.If x,y and z are arrays then plot them using plot3 to see what they look like.If it looks like they lie on a surface then interpolate using fit function.

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