How to plot a surface from 3D scatter data

Hi, I'm relatively new to MATLAB and have been struggling with a plotting problem. I have some 3D scatter data that results from a calculation done in spherical coordinates. The data are converted to cartesian coordinates for plotting. A sample of the data I am playing with are in the attached file. I would like to plot this data as a surface interpolated between the points.
If I plot the data as 3D scatter it renders well, but is hard to interpret:
%load data
load('SSTdata.mat');
scatter3(SST(:,1),SST(:,2),SST(:,3));
% remove non-unique points (from poles)
[A, ia, ic] = unique(SST,'rows');
% delaunay triangulation
tri = delaunay(A(:,1),A(:,2));
% plot
trisurf(tri,A(:,1),A(:,2),A(:,3));
but what is returned is not well representative of the data. I suppose I can see how it happened from the triangulation algorithm though. Is there a better way to do this?

댓글 수: 1

Carine Alves
Carine Alves 2018년 7월 17일
Hello. I am facing the same problem.Could you solve the problem?

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

답변 (0개)

카테고리

질문:

2016년 3월 15일

댓글:

2018년 7월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by