How can I plot different polygons from data file

Hi, I have a file.dat which is more than 25,000 rows & 5 columns. This file is the coordinates of the polygons stating from 1, 2 ,3, ......, 25626 polygons. I know how to plot polygons, but it is hard to choose the specific data for each polygon because some have 3, 4, 5 or 6 vertices!Between the rows are the area and the perimeter for each polygon. I could not attach the whole file!, so I type a sample below: 25626 30000 1 5 0 2041.151367 9.80324448 2042.262571 26.33920806 2051.084632 16.54407922 2078.023237 0 2099.95421 2 4 12.22531989 2699.003946 0 2702.333874 0 2655.290064 23.41980067 2680.385754 3 6 0 479.8992218 0 446.7519111 11.62744005 451.1822879 13.79598946 464.5252369 12.31101742 472.6413156 5.53296276 478.7269813 4 3 0 2135.061152 10.4369425 2147.807103 0 2144.41349 5 5 32.26876953 2466.074156 35.44786181 2459.566742 0 2429.308404 0 2482.137603 3.45591602 2482.288668 6 5 0 565.3958296 16.19391565 585.653887 26.27410517 603.469291 4.68035448 611.7576385 0 605.4805555
How can I do that

1 Comment

Please format your data correctly. It is very difficult to understand, how your data is distributed in rows. You also mentioned that file contains 5 columns, then how can a row represent 6 vertice polygon.

Sign in to comment.

Answers (0)

Categories

Asked:

on 22 Mar 2018

Commented:

on 22 Apr 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!