MATLAB: Draw a five star

MATLABplot

I have a homework to draw a star on matlab: Let the vertices of a five star be (6.5, 0),(9, 5),(14, 5.5),(10.5, 9),(12, 14), (6.5, 11.5),(2, 14),(3.5, 9),(0, 5.5),(5, 5). Draw the graph of the above vertices. Anyone have any idea

Best Answer

Read about plot.
A = [ 6.5, 0
9, 5,
14, 5.5,
10.5, 9,
12, 14,
6.5, 11.5,
2, 14,
3.5, 9,
0, 5.5
,5, 5
6.5, 0 ] ;
plot(A(:,1),A(:,2))
If you want color use:
patch(A(:,1),A(:,2),'r')