How can I draw a line with two points x1, y1 and x2, y2 and assign weight to the edge.
조회 수: 5 (최근 30일)
이전 댓글 표시
How can I draw a line with two points (x1, y1) and (x2, y2) and assign weight to the edge.
Thanks in advance.
댓글 수: 4
답변 (1개)
Scott MacKenzie
2022년 3월 10일
편집: Scott MacKenzie
2022년 3월 10일
x1 = 0; x2 = 1;
y1 = 0; y2 = 1;
line([x1 x2], [y1 y2], 'linewidth', 5);
text(0.45, 0.55, '10', 'FontSize', 14);
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!