Attached input w/ new extension name (txt).
Plot smooth surface from scatter points
2 次查看(过去 30 天)
显示 更早的评论
I am trying to plot smooth surface from scattered points as attached file. However, the surface I got is not smoothed at the edge. And I even can't use single color for it. Please help me and thanks in advance.
ifc1 = load('iface1.dx');
ifc1x = ifc1(:,3);
ifc1y = ifc1(:,1);
ifc1z = ifc1(:,2);
[ifc1xq,ifc1yq] = meshgrid(min(ifc1x):10:max(ifc1x),min(ifc1y):10:max(ifc1y));
ifc1zq = griddata(ifc1x,ifc1y,ifc1z,ifc1xq,ifc1yq);
mesh(ifc1xq, ifc1yq,ifc1zq);
hold on;
figure(1)
s = surf(ifc1xq, ifc1yq,ifc1zq,'EdgeColor','g','LineStyle','none'); hold on
set(s, 'FaceColor',[.1 .9 .1],'FaceAlpha',0.6);
hidden off
回答(0 个)
另请参阅
类别
在 Help Center 和 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!