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
2018 年 7 月 17 日
Hello. I am facing the same problem.Could you solve the problem?
回答 (0 件)
カテゴリ
ヘルプ センター および 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!