When making a surface plot from scattered 3D data

10 vues (au cours des 30 derniers jours)
JUNYOUNG AN
JUNYOUNG AN le 21 Fév 2018
Commenté : Piyush Sharma le 14 Nov 2020
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 commentaire
Piyush Sharma
Piyush Sharma le 14 Nov 2020
Hello there, I want to achieve the same thing. Can i ask you how did you plot the points?

Connectez-vous pour commenter.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!