clc
clear
close all
Data
x = data(:,1);
y = data(:,2);
z = thk;
step = 3;
[xx,yy]=meshgrid(-100:step:100,-100:step:100);
for i = 1 : size(xx,1)
for j = 1 : size(xx,1)
r = sqrt( xx(i,j)^2 + yy(i,j)^2 );
% 绘制缺口
if sqrt( (xx(i,j) - 0)^2 + (yy(i,j) + 98 )^2) < 5
xx(i, j) = xx(i, j) / r * 95;
yy(i, j) = yy(i, j) / r * 95;
% 绘制圆形
elseif r > 100
xx(i, j) = xx(i, j) / r * 100;
yy(i, j) = yy(i, j) / r * 100;
end
end
end
F = scatteredInterpolant(x,y,z);
zz = F(xx,yy);
figure
plot3(x, y, z, '-*')
grid on
xlabel('X')
ylabel('Y')
zlabel('Thk')
title('Before')
figure
mesh(xx,yy,zz)
xlabel('X')
ylabel('Y')
zlabel('Thk')
title('After')
11-04
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交