필터 지우기
필터 지우기

Rectangular Box plotting from four co-ordinate

조회 수: 1 (최근 30일)
BILLAL Hossain
BILLAL Hossain 2021년 9월 8일
답변: Chunru 2021년 9월 9일
Hi, I am trying to plot a rectangular box in a xlim([0 25]) ylim([0 25]). I have co-ordinate values of four point and tried following code:
x_points = [x1 x2 x3 x4];
y_points = [y1 y2 y3 y4];
caustom_plot=plot(x_points,y_points,'k','Linewidth',2);
It shows a rectangular shape but one side is open. How can i fix the issue?

답변 (1개)

Chunru
Chunru 2021년 9월 9일
caustom_plot=plot(x_points([1:end 1]),y_points([1:end 1]),'k','Linewidth',2);

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by