フィルターのクリア

How do i create a hole or cut a certain portion of a plane in GUI?

2 ビュー (過去 30 日間)
DIJESH
DIJESH 2014 年 6 月 20 日
回答済み: Dishant Arora 2014 年 6 月 20 日
x = [100 100 100 100];
y = [100 100 100 100];
z = [0 0 0 0];
fill3(x,y,z,blue,'FaceAlpha',0.4)
This would create an x-y plane of blue colour. What is the code if i want to create a hole in the moddle of this plane? Or what if I want to remove a small rectangular portion from the centre of this plane? Please help.

回答 (2 件)

Dishant Arora
Dishant Arora 2014 年 6 月 20 日
Z = zeros(100,100);
Z(40:60,40:60) = nan;
mesh(Z)

David Sanchez
David Sanchez 2014 年 6 月 20 日
x = [0 100 100 0];
y = [0 0 100 100];
z = [0 0 0 0];
fill(x,y,'b')
x_hole = [40 60 60 40];
y_hole = [40 40 60 60 ];
hold on
fill(x_hole,y_hole,'w')
hold off
  1 件のコメント
DIJESH
DIJESH 2014 年 6 月 20 日
u just filled it with white.. I want to cut it out no more filling or overlapping.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by