Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我在MATLAB中有一个2D散点图。是否可以对散点图进行插值以创建面积图?
回答: 如果您只是想在整个散布点周围绘制一个大的填充多边形,则可以使用函数CONVHULL查找包含点的凸包,并使用PATCH显示凸包: x = rand(1,20); %# 20 random x values y = rand(1,20); %# 20 random y values hullPoints = convhull(x,y); %# Find the points defining the convex hull patch(x(hullPoints),y(hullPoints),'r'); %# Plot the convex hull in red hold on; %# Add to the existing plot scatter(x,y); %# Plot your scattered points (for comparison) 这是结果图: ![]() 更多&回答... |
![]() |
![]() |