Why is my surface not fitting the data points smoothly?

1 次查看(过去 30 天)
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.
  3 个评论
Nicholas
Nicholas 2015-1-13
No I don't have any NaNs in the data set - is it possible that there aren't enough points?
Star Strider
Star Strider 2015-1-13
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.

请先登录,再进行评论。

回答(1 个)

Alessandro Masullo
Alessandro Masullo 2015-1-13
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.
  1 个评论
Nicholas
Nicholas 2015-1-13
I think the points order is probably influencing this as if I change the shape of the arrays, a different surface appears. I have no clue as to why reshaping the arrays would be doing this though

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by