답변 (1개)

DGM
DGM 2022년 10월 31일
편집: DGM 2022년 10월 31일

0 개 추천

Given the same position vector that would be used for rectangle():
% the position parameter used by rectangle()
pos = [0 0 20 10]; % [x y w h]
% rearrange to create a point list
x = pos(1) + pos(3)*[0 1 1 0 0];
y = pos(2) + pos(4)*[0 0 1 1 0];
% plot it
plot(x,y)
If you intend to replicate other functionality of rectangle(), that will be more complicated.

댓글 수: 1

DGM
DGM 2022년 10월 31일
You have some offset in your position data. That's not something I can know from this information. Look at whatever calculations you're using to caclulate the center positions of the holes. Work backwards from there.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기

태그

질문:

PA
2022년 10월 31일

댓글:

DGM
2022년 10월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by