How can I mark a region in matlab ?

조회 수: 6 (최근 30일)
Thai Anh
Thai Anh 2022년 12월 1일
댓글: Thai Anh 2022년 12월 1일
like this pic
  댓글 수: 1
Thai Anh
Thai Anh 2022년 12월 1일
Full quest :
Let D be a domain bounded by x + y = 1, x = √y, and y = 0.
Sketch the domain

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

채택된 답변

Stephan
Stephan 2022년 12월 1일
x1 = 0:0.001:1;
y1 = x1.^2;
y2 = 1 - x1;
xcut = fzero(@(x)x.^2 - 1+x, 0.5);
x = [x1(x1<=xcut), x1(end)];
y = [x1(x1<=xcut).^2, 1-x1(end)];
P = polyshape(x,y);
plot(x1,y1,x1,y2,x,y)
hold on
plot(P)
hold off
xlim([0,1])
ylim([0,1])
  댓글 수: 1
Thai Anh
Thai Anh 2022년 12월 1일
thank u, I really appreciate that :3

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Computational Geometry에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by