3d surface plot by having 3 uncorrelated vectors
이전 댓글 표시
Hi everyone,
I'm trying to plot a 3D surface in Matlab, having three different vectors x,y,z. All the three have dimension 1601x1 and they are not correlated by any mathematical formula, they are only coordinates of some points that have to be plotted. I would like to plot a 3d homogeneous surface (not point by point) with different colours indicating the different heights (maybe yellow where z is higher and blue where z is lower). I don't want a discrete surface (actually I've already tried to use plot3 but it seems to be a point surface or a line one, I want an homogenous thing).
Could you help me please?
Thank you in advance,
Gianmarco
댓글 수: 3
Walter Roberson
2021년 1월 29일
In order to describe a surface, you need information about which points are connected to which, so that you can create faces. You currently have a list of points, but how to decide which points are connected to which ones?
Gianmarco Azzolin
2021년 1월 29일
KSSV
2021년 1월 29일
Attach your data.
답변 (1개)
KSSV
2021년 1월 29일
Let (x,y,z) be your three column arrays.
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
카테고리
도움말 센터 및 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!