creating a rectangle plot
显示 更早的评论
回答(3 个)
p = [0 2 2 3 3 5 5 0 0;
0 0 1 1 0 0 4 4 0];
plot(p(1,:), p(2,:))
6 个评论
PA
2022-7-25
Chunru
2022-7-25
You can use polygon but not rectangle since it is NOT a rectangle.
PA
2022-7-25
Walter Roberson
2022-7-25
top row of p is x coordinates. Bottom row is y coordinates.
PA
2022-7-26
You can work out the coordinates (use nan to break up the line).
p = [0 4 nan 6 7 7 0 0 nan 4 6 6 4 4;
0 0 nan 0 0 5 5 0 nan -1 -1 1 1 -1];
plot(p(1,:), p(2,:)); axis off
4 个评论
Walter Roberson
2022-7-29
it is not clear what information is given? or is it an image that is given?
PA
2022-7-29
PA
2022-7-29
Walter Roberson
2022-7-29
please post a sample image that does not have the annotations
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

