How can I mark a region in matlab ?
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
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])
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!