Why is my surface not fitting the data points smoothly?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have a set of 125 (x,y,z) data points that are supposed to represent smooth planes. I am trying to calculate the curvature on these planes but the surfaces are not fitting the data points smoothly (please see below). I don't know why this is happening and if anyone could provide advice that would be much fantastic.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146786/image.jpeg)
3 commentaires
Star Strider
le 13 Jan 2015
If you have 125 data triplets, and none of them are NaN, you should have enough points to define your surface. I would use scatter3 or stem3 (that I prefer because it tells me where the x and y coordinates for a particular z are located) to see what your data look like with it. It could give you some insight into the problem.
Réponses (1)
Alessandro Masullo
le 13 Jan 2015
You can try to plot your surface with trisurf:
[x,y]=meshgrid(1:15,1:15);
tri = delaunay(x,y);
z = peaks(15);
trisurf(tri,x,y,z)
Can your problem be related to the points order?
There's also a Matlab bug related with the plot of surfaces. Try to execute opengl software, close all your windows and try again.
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!