hold on
rectangle('Position',[1.5 1.25 1 1.5],'Curvature',0.2, "FaceColor",'k')
axis([0 5 0 5])
v=randi(6);
switch v
case 1
hold on
scatter(2, 2, 'filled', 'w')
case 2
scatter(1.75, 2.5, 'filled', 'w')
hold on
scatter(2.25, 1.5, 'filled', 'w')
hold on
case 3
scatter(1.75, 1.5, 'filled', 'w')
hold on
scatter(2, 2, 'filled', 'w')
scatter(2.25, 2.5, 'filled', 'w')
hold on
case 4
scatter(1.75, 1.5, 'filled', 'w')
hold on
scatter(1.75, 2.5, 'filled', 'w')
scatter(2.25, 1.5, 'filled', 'w')
scatter(2.25, 2.5, 'filled', 'w')
hold on
case 5
scatter(1.75, 1.5, 'filled', 'w')
hold on
scatter(1.75, 2.5, 'filled', 'w')
scatter(2.25, 1.5, 'filled', 'w')
scatter(2.25, 2.5, 'filled', 'w')
scatter(2, 2, 'filled', 'w')
case 6
scatter(1.75, 1.5, 'filled', 'w')
hold on
scatter(1.75, 2.5, 'filled', 'w')
scatter(2.25, 1.5, 'filled', 'w')
scatter(2.25, 2.5, 'filled', 'w')
scatter(1.75, 2, 'filled', 'w')
scatter(2.25, 2, 'filled', 'w')
hold on
end
axis([0 4 0 4])
Best Answer