I have data of the type in a text file:
object ID: 1114
class label: 1
sign meaning: 15-fr
trajectory:
-0.802268 0.585080
-0.802268 0.567350
-0.802268 0.549620
-0.802268 0.523026
-0.802268 0.496431
-0.802268 0.478702
-0.802268 0.469837
-0.788971 0.438810
-0.788971 0.438810
-0.788971 0.438810
-0.788971 0.438810
-0.788971 0.438810
-0.788971 0.447675
-0.793404 0.505296
-0.793404 0.527458
-0.793404 0.527458
-0.784539 0.527458
-0.775674 0.514161
-0.780106 0.491999
-0.771241 0.483134
-0.762377 0.469837
-0.753512 0.469837
-0.753512 0.478702
-0.753512 0.487566
-0.753512 0.505296
-0.753512 0.549620
-0.757944 0.598377
-0.757944 0.598377
-0.757944 0.580647
-0.757944 0.558485
-0.757944 0.540755
-0.757944 0.531891
-0.744647 0.527458
-0.744647 0.527458
-0.744647 0.527458
-0.744647 0.536323
-0.744647 0.571782
-0.744647 0.607242
-0.744647 0.642701
-0.744647 0.655998
-0.744647 0.638269
-0.740214 0.607242
-0.735782 0.585080
-0.735782 0.567350
-0.731350 0.558485
-0.731350 0.558485
-0.731350 0.558485
-0.731350 0.558485
-0.731350 0.580647
-0.731350 0.607242
-0.744647 0.647134
-0.753512 0.678161
-0.753512 0.678161
-0.753512 0.651566
-0.744647 0.633836
-0.744647 0.607242
-0.744647 0.598377
-0.744647 0.589512
-0.735782 0.589512
-0.735782 0.589512
-0.735782 0.589512
-0.735782 0.589512
-0.735782 0.589512
-0.735782 0.598377
-0.735782 0.616107
-0.735782 0.655998
-0.740214 0.673728
-0.731350 0.673728
-0.731350 0.655998
-0.731350 0.629404
-0.731350 0.602809
-0.718052 0.580647
-0.709188 0.571782
-0.709188 0.571782
-0.700323 0.571782
-0.700323 0.571782
-0.700323 0.571782
-0.700323 0.571782
-0.709188 0.629404
-0.709188 0.655998
-0.722485 0.687025
-0.726917 0.700323
-0.726917 0.700323
How do I import this into Matlab. I want to store all of the data, not just the numerical. I have tried importdata in Matlab but am losing the data from object id and class label. The data above is just one object and I have about 2000 such objects. I want to store all these in sequential order.
A{1} = 'object ID: 1114';A{2} = 'class label: 1';A{3} = sign meaning: 15-fr;... Is it sufficient storing each line in a string, or do you expect something more meaningful, (e.g pairs of name, and value)? - Rotem