当前位置:网站首页>Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
Draw a circle quickly in MATLAB (the one that can be drawn directly given the coordinates and radius of the center of the circle)
2022-04-23 08:07:00 【Dream of Grass】
stay MATLAB Draw a circle quickly in ( Given the coordinates and radius of the center of the circle, you can draw it directly )
use rectangle function
We will use matlab Of rectangle, To draw a circle .
Simply look at the official documents
rectangle('Position',pos,'Curvature',cur)
Add curvature to the edges of the rectangle . To use different curvatures along horizontal and vertical edges , Please put cur
Designated as [horizontal vertical]
Two element vector of form . To use the same curvature along all edges , Please put cur
Specify as a scalar value . Please specify the value as 0( No curvature ) and 1( Maximum curvature ) Between the value of the . Use [1 1]
Create an ellipse or circle .
An example is also given in the document , But the of this example pos The parameters are not very intuitive , The radius and the center of the circle can not be drawn .
Here is the code that can achieve the purpose , In practical application, give them respectively x y r Assignment can .
x = Abscissa ;
y = Ordinate ;
r = radius ;
rectangle('Position',[x-r,y-r,2*r,2*r],'Curvature',[1,1],'EdgeColor','m')
The following figure is a schematic diagram of drawing many circles .
Thank you. !
版权声明
本文为[Dream of Grass]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230645404533.html
边栏推荐
- Research on system and software security (3)
- CSV Column Extract列提取
- Ribbon启动流程
- Talk about the essence of interface idempotent and consumption idempotent
- 内网渗透系列:内网隧道之icmp_tran
- Intranet penetration series: pingtunnel of Intranet tunnel
- Positioning and decoration style
- Intranet penetration series: icmptunnel of Intranet tunnel (by master dhavalkapil)
- Flutter之Provider共享数据的两种方式
- Reverse linked list exercise
猜你喜欢
随机推荐
利用sqlmap注入获取网址管理员账号密码
Cloud computing skills competition -- Part 2 of openstack private cloud environment
Intranet penetration series: dns2tcp of Intranet tunnel
数据安全问题已成隐患,看vivo如何让“用户数据”重新披甲
Go语学习笔记 - 异常处理 | 从零开始Go语言
Flatten arrays
[go]常见的并发模型[泛型版]
惨了,搞坏了领导的机密文件,吐血分享备份文件的代码技巧
渗透测试面试合集---HVV---
Reptile learning notes, learning reptile, read this article is enough
KVM安装部署
面试学习路线
內網滲透系列:內網隧道之icmpsh
Intranet penetration series: icmptunnel of Intranet tunnel (by master dhavalkapil)
[极客大挑战 2019]Havefun1
Internal network security attack and defense: a practical guide to penetration testing (IV): Authority improvement analysis and defense
内网渗透系列:内网隧道之icmptunnel(jamesbarlow师傅的)
Redis transaction implements optimistic locking principle
Reverse linked list exercise
Feign source code analysis