MATLAB: A MATLAB Dice Function to display the face of the dice

dicematlab functionplotting

Please help me with this question, it is related to plotting :
Write a MATLAB function called ‘dice’. The function should open a figure and display the given face of a regular six-sided die. The face ‘number’ is the only input argument, k. Examples of the desired output are shown in Figure. Notice the rounded corners. The orientation of faces 2, 3 and 6 does not matter as long as the white dots form the desired pattern.

Best Answer

From the suggestion by @Image Analyst, I used Scatter and it worked.
The Output:
The Code is :
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])