How do I convert a dat file to a matrix ?

3 views (last 30 days)
Traian Preda
Traian Preda on 3 Feb 2014
Answered: Walter Roberson on 3 Feb 2014
Hi,
I have a dat file like this and I want to convert it to the correspondent matrix. Any idea?
33 33 0 -14,2857141494751
33 32 0 14,2857141494751
32 32 5,16444921493530 -17,1363386435501
32 33 0 14,2857141494751
32 31 -5,16444921493530 2,83063149452209
31 31 5,81244719028473 -3,50478277545562
31 32 -5,16444921493530 2,83063149452209
31 26 -0,647997975349426 0,674232780933380
30 30 0 -12,5000000000000
30 29 0 12,5000000000000
29 29 3,44214987754822 -14,3857700728913
29 30 0 12,5000000000000
29 27 -3,44214987754822 1,88578057289124
28 28 0 -16,6666679382324
28 27 0 16,6666679382324
27 27 7,76428341865540 -23,0431180461210
27 29 -3,44214987754822 1,88578057289124
27 28 0 16,6666679382324
27 26 -4,32213354110718 4,49069118499756
26 26 5,91732680797577 -6,14818844076672
26 31 -0,647997975349426 0,674232780933380
26 27 -4,32213354110718 4,49069118499756
26 23 -0,947195291519165 0,983554124832153
25 25 0 -16,6666679382324
25 24 0 16,6666679382324
24 24 5,73690319061279 -19,8096252860746
24 25 0 16,6666679382324
24 23 -5,73690319061279 3,14296364784241
23 23 8,13396751880646 -6,79698996261550
23 26 -0,947195291519165 0,983554124832153
23 24 -5,73690319061279 3,14296364784241
23 5 -1,44986903667450 2,67071413993835
22 22 0 -12,5000000000000
22 21 0 12,5000000000000
21 21 5,73692369461060 -15,6429568710050
21 22 0 12,5000000000000
21 19 -5,73692369461060 3,14296317100525
20 20 0 -14,2857141494751
20 19 0 14,2857141494751
19 19 8,05789875984192 -21,7021402188934
19 21 -5,73692369461060 3,14296317100525
19 20 0 14,2857141494751
19 16 -2,32097506523132 4,27348899841309
18 18 0 -14,2857141494751
18 17 0 14,2857141494751
17 17 3,97241902351379 -16,4625331954558
17 18 0 14,2857141494751
17 16 -3,97241902351379 2,17682814598083
16 16 8,61436915397644 -10,7237574428073
16 19 -2,32097506523132 4,27348899841309
16 17 -3,97241902351379 2,17682814598083
16 11 -2,32097506523132 4,27348899841309
2101 2101 0 -11,1111106872559
2101 12 0 11,1111106872559
12 12 4,98629283905029 -16,2939490139406
12 2101 0 11,1111106872559
12 11 -4,98629283905029 5,18284797668457
15 15 0 -16,6666679382324
15 14 0 16,6666679382324
14 14 17,2378139495850 -26,0782258968261
14 15 0 16,6666679382324
14 11 -17,2378139495850 9,41156005859375
11 11 25,3916405439377 -20,7882113622222
11 16 -2,32097506523132 4,27348899841309
11 12 -4,98629283905029 5,18284797668457
11 14 -17,2378139495850 9,41156005859375
11 6 -0,846558690071106 1,92039322853088
10 10 0 -11,1111106872559
10 9 0 11,1111106872559
9 9 3,62119841575623 -14,8543586745363
9 10 0 11,1111106872559
9 7 -3,62119841575623 3,74326133728027
8 8 0 -11,1111106872559
8 7 0 11,1111106872559
7 7 9,21432995796204 -27,5398039357792
7 9 -3,62119841575623 3,74326133728027
7 8 0 11,1111106872559
7 6 -5,59313154220581 12,6854524612427
6 6 22,4287048578262 -45,6684059321319
6 11 -0,846558690071106 1,92039322853088
6 7 -5,59313154220581 12,6854524612427
6 5 -15,9890146255493 31,0626277923584
5 5 17,4388836622238 -43,6532972840841
5 23 -1,44986903667450 2,67071413993835
5 6 -15,9890146255493 31,0626277923584
5 4 0 10
4 4 12,3738393783569 -69,4173546847887
4 5 0 10
4 2 -12,3738393783569 59,4194831848145
2 2 24,7476787567139 -10118,8347093696
2 4 -12,3738393783569 59,4194831848145
2 3 0 10000
2 1 -12,3738393783569 59,4194831848145
3 3 0 -10000
3 2 0 10000

Answers (1)

Walter Roberson
Walter Roberson on 3 Feb 2014

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!