# curve, data ,import

Posted 8 years ago
3933 Views
|
6 Replies
|
0 Total Likes
|
 Hello, How to use this set of data for curve analysis. I can use interpolation but this data looks a bit difficult for me after an import. Also how to convert this a matrix and reach to each Colum. A simple import and matrix from does not work as there are issue of comma in list, Time Area 1 Area 2 Temp(xx,yy degree Celsius) 00:00:00, 037 32,17 34,96 here 32,17 is 32.17 Please go through attachment. Thanks in advance. Attachments:
6 Replies
Sort By:
Posted 8 years ago
 . Map[Flatten[{StringDrop[#[[1]], -1], #[[2]], ToExpression[Drop[#, 2]]}] &, StringSplit[Rest[StringSplit[StringReplace[Import["testdata.txt"], "," -> "."], "\n"]], "\t"]] 
Posted 8 years ago
 please help me to modify the attached file like below{{00:00:00 037 32.17 34.96}, {00:00:00 074 32.17 34.96}, {00:00:00 111 32.17 34.96}, {00:00:00 148 32.17 34.96}, {00:00:00 037 32.17 34.96}, {00:00:00 074 32.17 34.96}] Attachments:
Posted 8 years ago
 Perhaps a little format hacking is in order In[1]:= Map[Flatten[{DateString[AbsoluteTime[First[#]]], ToExpression[Rest[#]]}] &, StringSplit[Rest[StringSplit[StringReplace[Import["testdata.txt"], "," -> "."], "\n"]], "\t"]] Out[1]= { {"Thu 1 Jan 2015 00:00:00", 37, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 74, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 111, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 148, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 37, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 74, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 111, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 148, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 185, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 222, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:00", 259, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:01", 296, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:02", 333, 32.17, 34.96}, {"Thu 1 Jan 2015 00:00:03", 370, 32.17, 34.96}} I'm not exactly certain how you want to apply the data, but perhaps with a little study you can see how to adapt this.If that isn't enough then perhaps you can show one line of input and the needed output form of that.
Posted 8 years ago
 thanks
Posted 8 years ago
 Thats nice but please look to my attachment, I have to process such files. I use StringReplace[Import["testdata.txt"], "," -> "."] // Table00:00:00. 037 32.17 34.96 00:00:01. here in this numerical line 00:00:00. how to remove . from the end, Its 100 page long data.
Posted 8 years ago
 Look at this.. change the path of file.. Attachments: