function myCircle(x, y)
%给两个点的坐标,以一个点为圆心 x =[a,b] ,长度为半径
plot([x(1),y(1)],[x(2),y(2)],'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',1);
hold on
for theta=0:0.1:360
x1 = cos(theta/180*pi) * (y(1)-x(1)) - ...
sin(theta/180*pi)*(y(2)-x(2)) + x(1);
y1 = sin(theta/180*pi) * (y(1)-x(1)) + ...
cos(theta/180*pi)*(y(2)-x(2)) + x(2);
plot(x1,y1,'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',1)
end

算法原理

用Matlab生成圆

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-08
  • 2021-09-04
  • 2022-01-16
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案