当前位置:网站首页>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
边栏推荐
- Codeforces Round #784 (Div. 4)
- [problem solving] vs2019 solves the problem that the EXE file generated by compilation cannot be opened
- RAID0和RAID5的创建和模拟RAID5工作原理
- Research on software security based on NLP (2)
- Three minutes to teach you to use Houdini fluid > > to solve particle fluid droplets
- 3C装配中的机械臂运动规划
- MySQL -- the secret of lock -- how to lock data
- BUUCTF [ACTF2020 新生赛]Include1
- Upload labs range practice
- 使用 Ingress 实现金丝雀发布
猜你喜欢
随机推荐
BUFFCTF文件中的秘密1
Hierarchical output binary tree
SAP sto with billing process and configuration
Analysis of Nacos source code
Link to some good tutorials or notes about network security and record them
Reptile learning notes, learning reptile, read this article is enough
Implementation of new
NLLLoss+log_SoftMax=CE_Loss
Redis事务实现乐观锁原理
在MATLAB中快速画圆(给出圆心坐标和半径就能直接画的那种)
Intranet security attack and defense: a practical guide to penetration testing (6): domain controller security
Reverse linked list exercise
Ignis公链的NFT生态发展:Unicorn.art的捐赠开发之路
Concours de compétences en informatique en nuage - - première partie de l'environnement cloud privé openstack
Flutter之Provider共享数据的两种方式
Implementation of promise all
Positioning and decoration style
SAP tr manual import system operation manual
Ctf-misc learning from start to give up
Redis transaction implements optimistic locking principle









