I have a 6x6 plot like shown in picture with grid on, it has boxes numbering from 1-36,(boxes are just due to having grid on) now I wanna draw traingle on any boxes e.g 14,15, how can I do it, like how do I define the x,y cords and width height for rectangle correctly, any ideas?

 채택된 답변

Cris LaPierre
Cris LaPierre 2022년 1월 7일

0 개 추천

Rectangle or triangle? Title and image show a rectangle so going with that.
You could use the plot command and supply it with the (x,y) coordinates of your corners. See Ch 9 of MATLAB Onramp.
You could use the rectangle function.
If you want to draw it, you could use drawrectangle

댓글 수: 1

I was already using rectangle function, and I have figured the way to obtained desired results. Apologies for bothering you guys. and also thanks for your kind responce

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 1월 7일

댓글:

2022년 1월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by