matlab在图片上rectangle详解
Rectangle 属性
矩形的外观和行为
矩形属性控制矩形对象的外观和行为。通过更改属性值,您可以修改矩形的特定方面。使用圆点表示法查询和设置属性。
h = rectangle;
w = h.LineWidth;
h.LineWidth = 3;
![](https://img-blog.csdnimg.cn/img_convert/d32d122b4d729bfdc11893794daae8d7.png)
![](https://img-blog.csdnimg.cn/img_convert/59f5b73f05981339c86557412fd5a61b.png)
rectangle('Position',rectx,'Edgecolor','w','LineWidth',2);%画矩形,红shai,粗2
rectangle('Position',rectx,'Edgecolor','w','LineWidth',2,'LineStyle','--');
![](https://img-blog.csdnimg.cn/img_convert/8389def3ee1ba1fe3210c71a7b52eda6.png)
详见官网链接:
https://ww2.mathworks.cn/help/matlab/ref/matlab.graphics.primitive.rectangle-properties.html