Hi,
it depends on the order you enter the single points. See this:
x8=[0, 2, 2.5, 3.5, 5, 4, 5, 3, 1, 1.5];
y8=[2, 2, 0, 2, 2, 3, 5, 3.5, 5, 3];
figure(7)
plot(x8,y8)
fill(x8,y8,'Red')
It starts at the first point P1(0,2) and goes counter-clockwise through the figure. Everytime there is a change of direction, the corresponding coordinates are entered.
Result is:
Best regards
Stephan