Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in importing data from files into matlab 1

Status
Not open for further replies.

kollurulp

Mechanical
Apr 2, 2004
12
I need to import the vales from a file into the matlab environment for drawing vectors etc. can someone help me out in giving an idea or code inorder to process this data. the file looks like this

machineid:FPA5000-AS2
date:04/01/07
time:20:02:21
deviceName:/canon
jobName:/M1259C1_Z/AA_3x2.job
auxSeq:XYSA
repeatCount:1
delayTime:0
shift:0.000 0.000
comment:Weekly Maintenance data
maxShotNo:132
diameter:200.000
orientationFlat:57.500
shotSize:15.066 17.520
data1:
Shot Pos.X[mm] Pos.Y[mm] Cx[nm] By[nm] none Bry[nm] Mx[nm] My[nm] Cr[ppm] Cm[ppm] status
19 35.154 -61.320 3 0 99999 99999 3 0 99.99 99.99 cc
20 20.088 -61.320 -10 9 99999 99999 -10 9 99.99 99.99 cc
21 5.022 -61.320 -1 9 99999 99999 -1 9 99.99 99.99 cc
22 -10.044 -61.320 -12 8 99999 99999 -12 8 99.99 99.99 cc
23 -25.110 -61.320 6 1 99999 99999 6 1 99.99 99.99 cc
24 -40.176 -61.320 -18 5 99999 99999 -18 5 99.99 99.99 cc
29 -60.264 -43.800 -4 0 99999 99999 -4 0 99.99 99.99 cc
30 -45.198 -43.800 0 3 99999 99999 0 3 99.99 99.99 cc
31 -30.132 -43.800 -6 10 99999 99999 -6 10 99.99 99.99 cc
32 -15.066 -43.800 1 15 99999 99999 1 15 99.99 99.99 cc
33 0.000 -43.800 -1 3 99999 99999 -1 3 99.99 99.99 cc
34 15.066 -43.800 -4 -1 99999 99999 -4 -1 99.99 99.99 cc
35 30.132 -43.800 1 0 99999 99999 1 0 99.99 99.99 cc
36 45.198 -43.800 -10 2 99999 99999 -10 2 99.99 99.99 cc
42 65.286 -26.280 -4 -14 99999 99999 -4 -14 99.99 99.99 cc
43 50.220 -26.280 5 -4 99999 99999 5 -4 99.99 99.99 cc
44 35.154 -26.280 -1 6 99999 99999 -1 6 99.99 99.99 cc
45 20.088 -26.280 -13 7 99999 99999 -13 7 99.99 99.99 cc
46 5.022 -26.280 1 11 99999 99999 1 11 99.99 99.99 cc
47 -10.044 -26.280 -3 1 99999 99999 -3 1 99.99 99.99 cc
48 -25.110 -26.280 -4 1 99999 99999 -4 1 99.99 99.99 cc
49 -40.176 -26.280 5 8 99999 99999 5 8 99.99 99.99 cc
50 -55.242 -26.280 -1 2 99999 99999 -1 2 99.99 99.99 cc
51 -70.308 -26.280 10 0 99999 99999 10 0 99.99 99.99 cc
55 -75.330 -8.760 -7 -3 99999 99999 -7 -3 99.99 99.99 cc
56 -60.264 -8.760 -3 -6 99999 99999 -3 -6 99.99 99.99 cc
57 -45.198 -8.760 -9 8 99999 99999 -9 8 99.99 99.99 cc
58 -30.132 -8.760 -10 1 99999 99999 -10 1 99.99 99.99 cc
59 -15.066 -8.760 2 2 99999 99999 2 2 99.99 99.99 cc
60 0.000 -8.760 -13 7 99999 99999 -13 7 99.99 99.99 cc
61 15.066 -8.760 -2 1 99999 99999 -2 1 99.99 99.99 cc
62 30.132 -8.760 9 -6 99999 99999 9 -6 99.99 99.99 cc
63 45.198 -8.760 -10 2 99999 99999 -10 2 99.99 99.99 cc
64 60.264 -8.760 -12 -5 99999 99999 -12 -5 99.99 99.99 cc
69 60.264 8.760 -7 -9 99999 99999 -7 -9 99.99 99.99 cc
70 45.198 8.760 7 2 99999 99999 7 2 99.99 99.99 cc
71 30.132 8.760 -7 11 99999 99999 -7 11 99.99 99.99 cc
72 15.066 8.760 8 12 99999 99999 8 12 99.99 99.99 cc
73 0.000 8.760 6 12 99999 99999 6 12 99.99 99.99 cc
74 -15.066 8.760 -4 7 99999 99999 -4 7 99.99 99.99 cc
75 -30.132 8.760 0 5 99999 99999 0 5 99.99 99.99 cc
76 -45.198 8.760 0 16 99999 99999 0 16 99.99 99.99 cc
77 -60.264 8.760 1 2 99999 99999 1 2 99.99 99.99 cc
78 -75.330 8.760 -16 5 99999 99999 -16 5 99.99 99.99 cc
82 -70.308 26.280 0 2 99999 99999 0 2 99.99 99.99 cc
83 -55.242 26.280 1 -3 99999 99999 1 -3 99.99 99.99 cc
84 -40.176 26.280 -7 10 99999 99999 -7 10 99.99 99.99 cc
85 -25.110 26.280 -3 6 99999 99999 -3 6 99.99 99.99 cc
86 -10.044 26.280 -7 13 99999 99999 -7 13 99.99 99.99 cc
87 5.022 26.280 2 13 99999 99999 2 13 99.99 99.99 cc
88 20.088 26.280 1 9 99999 99999 1 9 99.99 99.99 cc
89 35.154 26.280 -6 -2 99999 99999 -6 -2 99.99 99.99 cc
90 50.220 26.280 3 10 99999 99999 3 10 99.99 99.99 cc
91 65.286 26.280 1 6 99999 99999 1 6 99.99 99.99 cc
97 45.198 43.800 9 -6 99999 99999 9 -6 99.99 99.99 cc
98 30.132 43.800 0 11 99999 99999 0 11 99.99 99.99 cc
99 15.066 43.800 -11 2 99999 99999 -11 2 99.99 99.99 cc
100 0.000 43.800 -8 12 99999 99999 -8 12 99.99 99.99 cc
101 -15.066 43.800 1 -2 99999 99999 1 -2 99.99 99.99 cc
102 -30.132 43.800 8 3 99999 99999 8 3 99.99 99.99 cc
103 -45.198 43.800 -10 -1 99999 99999 -10 -1 99.99 99.99 cc
104 -60.264 43.800 -8 6 99999 99999 -8 6 99.99 99.99 cc
109 -40.176 61.320 -5 -6 99999 99999 -5 -6 99.99 99.99 cc
110 -25.110 61.320 2 5 99999 99999 2 5 99.99 99.99 cc
111 -10.044 61.320 -2 9 99999 99999 -2 9 99.99 99.99 cc
112 5.022 61.320 -2 -1 99999 99999 -2 -1 99.99 99.99 cc
113 20.088 61.320 -7 -1 99999 99999 -7 -1 99.99 99.99 cc
114 35.154 61.320 4 -9 99999 99999 4 -9 99.99 99.99 cc
machineid:FPA5000-AS2
date:04/01/07
time:20:03:19
deviceName:/canon
jobName:/M1259C1_Z/AA_3x2.job
auxSeq:XYSA
repeatCount:1
delayTime:0
shift:0.000 0.000
comment:Weekly Maintenance data
maxShotNo:132
diameter:200.000
orientationFlat:57.500
shotSize:15.066 17.520
data1:
Shot Pos.X[mm] Pos.Y[mm] Cx[nm] By[nm] none Bry[nm] Mx[nm] My[nm] Cr[ppm] Cm[ppm] status
19 35.154 -61.320 -1 -11 99999 99999 -1 -11 99.99 99.99 cc
20 20.088 -61.320 -7 4 99999 99999 -7 4 99.99 99.99 cc
21 5.022 -61.320 2 5 99999 99999 2 5 99.99 99.99 cc
22 -10.044 -61.320 -15 3 99999 99999 -15 3 99.99 99.99 cc
23 -25.110 -61.320 -1 1 99999 99999 -1 1 99.99 99.99 cc
24 -40.176 -61.320 5 5 99999 99999 5 5 99.99 99.99 cc
29 -60.264 -43.800 -9 5 99999 99999 -9 5 99.99 99.99 cc
30 -45.198 -43.800 1 -3 99999 99999 1 -3 99.99 99.99 cc
31 -30.132 -43.800 12 -2 99999 99999 12 -2 99.99 99.99 cc
32 -15.066 -43.800 2 7 99999 99999 2 7 99.99 99.99 cc
33 0.000 -43.800 -5 15 99999 99999 -5 15 99.99 99.99 cc
34 15.066 -43.800 -6 14 99999 99999 -6 14 99.99 99.99 cc
35 30.132 -43.800 -9 1 99999 99999 -9 1 99.99 99.99 cc
36 45.198 -43.800 2 -3 99999 99999 2 -3 99.99 99.99 cc
42 65.286 -26.280 -13 -13 99999 99999 -13 -13 99.99 99.99 cc
43 50.220 -26.280 -6 -17 99999 99999 -6 -17 99.99 99.99 cc
44 35.154 -26.280 -2 -2 99999 99999 -2 -2 99.99 99.99 cc
45 20.088 -26.280 -2 2 99999 99999 -2 2 99.99 99.99 cc
46 5.022 -26.280 -1 7 99999 99999 -1 7 99.99 99.99 cc
47 -10.044 -26.280 -3 16 99999 99999 -3 16 99.99 99.99 cc
48 -25.110 -26.280 -6 14 99999 99999 -6 14 99.99 99.99 cc
49 -40.176 -26.280 -2 8 99999 99999 -2 8 99.99 99.99 cc
50 -55.242 -26.280 11 -15 99999 99999 11 -15 99.99 99.99 cc
51 -70.308 -26.280 5 -5 99999 99999 5 -5 99.99 99.99 cc
55 -75.330 -8.760 -2 6 99999 99999 -2 6 99.99 99.99 cc
56 -60.264 -8.760 4 0 99999 99999 4 0 99.99 99.99 cc
57 -45.198 -8.760 -1 -9 99999 99999 -1 -9 99.99 99.99 cc
58 -30.132 -8.760 -5 7 99999 99999 -5 7 99.99 99.99 cc
59 -15.066 -8.760 -7 9 99999 99999 -7 9 99.99 99.99 cc
60 0.000 -8.760 -4 13 99999 99999 -4 13 99.99 99.99 cc
61 15.066 -8.760 3 1 99999 99999 3 1 99.99 99.99 cc
62 30.132 -8.760 -5 2 99999 99999 -5 2 99.99 99.99 cc
63 45.198 -8.760 -6 -6 99999 99999 -6 -6 99.99 99.99 cc
64 60.264 -8.760 -7 -12 99999 99999 -7 -12 99.99 99.99 cc
69 60.264 8.760 0 -7 99999 99999 0 -7 99.99 99.99 cc
70 45.198 8.760 -6 -6 99999 99999 -6 -6 99.99 99.99 cc
71 30.132 8.760 -4 -5 99999 99999 -4 -5 99.99 99.99 cc
72 15.066 8.760 7 10 99999 99999 7 10 99.99 99.99 cc
73 0.000 8.760 2 10 99999 99999 2 10 99.99 99.99 cc
74 -15.066 8.760 -11 17 99999 99999 -11 17 99.99 99.99 cc
75 -30.132 8.760 5 13 99999 99999 5 13 99.99 99.99 cc
76 -45.198 8.760 6 -3 99999 99999 6 -3 99.99 99.99 cc
77 -60.264 8.760 4 8 99999 99999 4 8 99.99 99.99 cc
78 -75.330 8.760 -18 -4 99999 99999 -18 -4 99.99 99.99 cc
82 -70.308 26.280 14 6 99999 99999 14 6 99.99 99.99 cc
83 -55.242 26.280 2 8 99999 99999 2 8 99.99 99.99 cc
84 -40.176 26.280 4 7 99999 99999 4 7 99.99 99.99 cc
85 -25.110 26.280 0 0 99999 99999 0 0 99.99 99.99 cc
86 -10.044 26.280 -7 8 99999 99999 -7 8 99.99 99.99 cc
87 5.022 26.280 4 14 99999 99999 4 14 99.99 99.99 cc
88 20.088 26.280 -7 19 99999 99999 -7 19 99.99 99.99 cc
89 35.154 26.280 2 -1 99999 99999 2 -1 99.99 99.99 cc
90 50.220 26.280 0 -6 99999 99999 0 -6 99.99 99.99 cc
91 65.286 26.280 -1 2 99999 99999 -1 2 99.99 99.99 cc
97 45.198 43.800 1 3 99999 99999 1 3 99.99 99.99 cc
98 30.132 43.800 3 0 99999 99999 3 0 99.99 99.99 cc
99 15.066 43.800 10 -13 99999 99999 10 -13 99.99 99.99 cc
100 0.000 43.800 -2 0 99999 99999 -2 0 99.99 99.99 cc
101 -15.066 43.800 -6 -7 99999 99999 -6 -7 99.99 99.99 cc
102 -30.132 43.800 -1 -2 99999 99999 -1 -2 99.99 99.99 cc
103 -45.198 43.800 0 11 99999 99999 0 11 99.99 99.99 cc
104 -60.264 43.800 2 6 99999 99999 2 6 99.99 99.99 cc
109 -40.176 61.320 5 -3 99999 99999 5 -3 99.99 99.99 cc
110 -25.110 61.320 0 -3 99999 99999 0 -3 99.99 99.99 cc
111 -10.044 61.320 8 0 99999 99999 8 0 99.99 99.99 cc
112 5.022 61.320 -3 10 99999 99999 -3 10 99.99 99.99 cc
113 20.088 61.320 7 6 99999 99999 7 6 99.99 99.99 cc
114 35.154 61.320 1 7 99999 99999 1 7 99.99 99.99 cc
machineid:FPA5000-AS2
date:04/01/07
time:20:04:18
deviceName:/canon
jobName:/M1259C1_Z/AA_3x2.job
auxSeq:XYSA
repeatCount:1
delayTime:0
shift:0.000 0.000
comment:Weekly Maintenance data
maxShotNo:132
diameter:200.000
orientationFlat:57.500
shotSize:15.066 17.520
data1:
Shot Pos.X[mm] Pos.Y[mm] Cx[nm] By[nm] none Bry[nm] Mx[nm] My[nm] Cr[ppm] Cm[ppm] status
19 35.154 -61.320 -6 -1 99999 99999 -6 -1 99.99 99.99 cc
20 20.088 -61.320 -1 3 99999 99999 -1 3 99.99 99.99 cc
21 5.022 -61.320 -6 5 99999 99999 -6 5 99.99 99.99 cc
22 -10.044 -61.320 -13 10 99999 99999 -13 10 99.99 99.99 cc
23 -25.110 -61.320 12 -3 99999 99999 12 -3 99.99 99.99 cc
24 -40.176 -61.320 2 14 99999 99999 2 14 99.99 99.99 cc
29 -60.264 -43.800 -7 3 99999 99999 -7 3 99.99 99.99 cc
30 -45.198 -43.800 -5 8 99999 99999 -5 8 99.99 99.99 cc
31 -30.132 -43.800 -15 8 99999 99999 -15 8 99.99 99.99 cc
32 -15.066 -43.800 -10 21 99999 99999 -10 21 99.99 99.99 cc
33 0.000 -43.800 -15 15 99999 99999 -15 15 99.99 99.99 cc
34 15.066 -43.800 5 3 99999 99999 5 3 99.99 99.99 cc
35 30.132 -43.800 1 6 99999 99999 1 6 99.99 99.99 cc
36 45.198 -43.800 -10 0 99999 99999 -10 0 99.99 99.99 cc
42 65.286 -26.280 -11 -11 99999 99999 -11 -11 99.99 99.99 cc
43 50.220 -26.280 -4 -9 99999 99999 -4 -9 99.99 99.99 cc
44 35.154 -26.280 -11 12 99999 99999 -11 12 99.99 99.99 cc
45 20.088 -26.280 1 1 99999 99999 1 1 99.99 99.99 cc
46 5.022 -26.280 2 2 99999 99999 2 2 99.99 99.99 cc
47 -10.044 -26.280 4 8 99999 99999 4 8 99.99 99.99 cc
48 -25.110 -26.280 -4 6 99999 99999 -4 6 99.99 99.99 cc
49 -40.176 -26.280 2 -2 99999 99999 2 -2 99.99 99.99 cc
50 -55.242 -26.280 -7 9 99999 99999 -7 9 99.99 99.99 cc
51 -70.308 -26.280 1 0 99999 99999 1 0 99.99 99.99 cc
55 -75.330 -8.760 4 8 99999 99999 4 8 99.99 99.99 cc
56 -60.264 -8.760 -3 11 99999 99999 -3 11 99.99 99.99 cc
57 -45.198 -8.760 -3 17 99999 99999 -3 17 99.99 99.99 cc
58 -30.132 -8.760 5 9 99999 99999 5 9 99.99 99.99 cc
59 -15.066 -8.760 -5 -5 99999 99999 -5 -5 99.99 99.99 cc
60 0.000 -8.760 -1 10 99999 99999 -1 10 99.99 99.99 cc
61 15.066 -8.760 1 3 99999 99999 1 3 99.99 99.99 cc
62 30.132 -8.760 -12 4 99999 99999 -12 4 99.99 99.99 cc
63 45.198 -8.760 -6 5 99999 99999 -6 5 99.99 99.99 cc
64 60.264 -8.760 -6 -4 99999 99999 -6 -4 99.99 99.99 cc
69 60.264 8.760 5 -4 99999 99999 5 -4 99.99 99.99 cc
70 45.198 8.760 -7 8 99999 99999 -7 8 99.99 99.99 cc
71 30.132 8.760 1 4 99999 99999 1 4 99.99 99.99 cc
72 15.066 8.760 -4 -1 99999 99999 -4 -1 99.99 99.99 cc
73 0.000 8.760 5 16 99999 99999 5 16 99.99 99.99 cc
74 -15.066 8.760 -4 6 99999 99999 -4 6 99.99 99.99 cc
75 -30.132 8.760 9 2 99999 99999 9 2 99.99 99.99 cc
76 -45.198 8.760 0 13 99999 99999 0 13 99.99 99.99 cc
77 -60.264 8.760 14 1 99999 99999 14 1 99.99 99.99 cc
78 -75.330 8.760 5 5 99999 99999 5 5 99.99 99.99 cc
82 -70.308 26.280 0 15 99999 99999 0 15 99.99 99.99 cc
83 -55.242 26.280 12 1 99999 99999 12 1 99.99 99.99 cc
84 -40.176 26.280 2 13 99999 99999 2 13 99.99 99.99 cc
85 -25.110 26.280 13 0 99999 99999 13 0 99.99 99.99 cc
86 -10.044 26.280 4 4 99999 99999 4 4 99.99 99.99 cc
87 5.022 26.280 17 5 99999 99999 17 5 99.99 99.99 cc
88 20.088 26.280 -5 9 99999 99999 -5 9 99.99 99.99 cc
89 35.154 26.280 -2 6 99999 99999 -2 6 99.99 99.99 cc
90 50.220 26.280 -9 11 99999 99999 -9 11 99.99 99.99 cc
91 65.286 26.280 1 6 99999 99999 1 6 99.99 99.99 cc
97 45.198 43.800 7 -2 99999 99999 7 -2 99.99 99.99 cc
98 30.132 43.800 -3 4 99999 99999 -3 4 99.99 99.99 cc
99 15.066 43.800 -16 -3 99999 99999 -16 -3 99.99 99.99 cc
100 0.000 43.800 8 19 99999 99999 8 19 99.99 99.99 cc
101 -15.066 43.800 -6 2 99999 99999 -6 2 99.99 99.99 cc
102 -30.132 43.800 4 4 99999 99999 4 4 99.99 99.99 cc
103 -45.198 43.800 4 -6 99999 99999 4 -6 99.99 99.99 cc
104 -60.264 43.800 -7 7 99999 99999 -7 7 99.99 99.99 cc
109 -40.176 61.320 -6 17 99999 99999 -6 17 99.99 99.99 cc
110 -25.110 61.320 0 1 99999 99999 0 1 99.99 99.99 cc
111 -10.044 61.320 2 -4 99999 99999 2 -4 99.99 99.99 cc
112 5.022 61.320 5 1 99999 99999 5 1 99.99 99.99 cc
113 20.088 61.320 9 14 99999 99999 9 14 99.99 99.99 cc
114 35.154 61.320 5 14 99999 99999 5 14 99.99 99.99 cc
 
Replies continue below

Recommended for you

"fscanf" is the most versatile function for this kind of thing, although unless you are familiar with this function from C programming then you may find it hard to get your head around.

If the line before the data of interest always starts with the same characters, then you can scan down to that point and then use fscanf to extract the data from the following lines.

M

--
Dr Michael F Platten
 
Thank you very much for the fast reply. i could do that using fscanf and some more functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor