How do I convert a text file which has one row of XY co-ordinate data into two separate columns?
1 view (last 30 days)
I am a novice with MATLAB. I have hundreds of text files (named Data1.txt, Data2.txt, Data3.txt etc...) that have XY co-ordinate data of the form:
X0 Y0 X1 Y2 X3 Y3 X4 Y4 ...
There are 400 sets of X-Y co-ordinates per text file. Each data entry is in a separate column (e.g. In Excel for example, X0 would be in cell A1, Y0 is in cell B1 and so on), but all data is in the same row.
Is there a way of converting the data from its current format into two columns, one for X co-ordinate and other for corresponding Y co-ordinates? (By co-ordinates I mean simply numbers only)
After this I would then like to export the columned data as a new text file (I will be concatenating all text files into one file for ArcMAP implementation. Can this be done in MATLAB?)