Plot a rectangle inside of a rectangle.
Show older comments
How can I plot a rectangle inside of a rectangle. I have a rectangle of 50 width and 20 length. I need a rectangle inside with 15 width and 10 length. How to code it? I need matlab code or suggations for this.
Accepted Answer
More Answers (1)
One way,
V=[-1 -1;
+1 -1;
+1 +1 ;
-1 +1]/2;
p=[polyshape(V.*[50,20]), polyshape(V.*[15,10])];
plot(p)
1 Comment
ANANTA BIJOY BHADRA
on 2 Feb 2022
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
