# MATLAB: Find vertices and plot triangle in Matlab

MATLAB

The vertices of triangle is given in
tri = [1 2 2 1; 1 2 -2 1]
I see that tri has 4 columns and 2 rows, but how does they define the vertices?
What are the vertices defined in the tri and how to plot them in Matlab?

#### Best Answer

 plot(tri(1,:), tri(2,:))