When making a surface plot from scattered 3D data

조회 수: 10 (최근 30일)
JUNYOUNG AN
JUNYOUNG AN 2018년 2월 21일
댓글: Piyush Sharma 2020년 11월 14일
Hi have some scattered 3D data which I want to make a surface plot.
The scattered data looks like the following.
it looks like some sort of cliff or headland. Now I want to make a surface plot from these data, so I used griddata() The code is the following
[xq, yq] = meshgrid(-95:2:190, 20:0.5:170);
vq = griddata(XYZ(:,1),XYZ(:,2),XYZ(:,3),xq,yq,'natural');
surf(xq, yq, vq); %XYZ is the 3 column array contains the scattered data
The result looks like the picture below.
However, I'm not satisfied with the result because of the wriggling valley between peaks. In other words, I wanted points with same height to be connected smoothly on the surface, which might look like the following picture.
Please notice the difference at the picture which is highlighted in red color. There is no valley between peaks like surface plot.
So my question is, how do I make a surface plot like the 3d plot at the bottom? For those who want to try, I'll attach the scattered data file.
Thanks.
  댓글 수: 1
Piyush Sharma
Piyush Sharma 2020년 11월 14일
Hello there, I want to achieve the same thing. Can i ask you how did you plot the points?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!