How do i insert the area of each shape in the centre of it?
조회 수: 4 (최근 30일)
이전 댓글 표시
This is my code below :
댓글 수: 0
채택된 답변
Image Analyst
2015년 5월 19일
Use sprintf() to create a string with the area in it. Then use text() to place it in the axes
caption = sprintf('Area = %.1f', area);
text(x, y, caption);
Of course you need to figure out what x and y are to position the string in the best looking spot.
댓글 수: 8
Image Analyst
2015년 5월 25일
Not sure what you mean. To get every triangle, or just any triangle in general, you have to make the x and y have the coordinates of the three vertices. But I'm sure you know that already , so I'm not really sure what the question is.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!