2つの線分で囲まれた​領域を塗りつぶすこと​はできますか?

조회 수: 6 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2009년 12월 8일
2つの線分で囲まれた領域を塗りつぶす方法を教えてください。

채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 1월 2일
線分に囲まれた領域を多角形とみなすことで色を塗ることが可能です。
下記例では、多角形とみなした領域を FILL 関数で塗りつぶしています。
x = 1:10;
y = rand(1,10);
y2 = rand(1,10);
X = [x,fliplr(x)];
Y = [y,fliplr(y2)];
fill(X,Y,'r')

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!