Message Boards Message Boards

0
|
3443 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

string operation

Posted 10 years ago

How to plot this when such a strange data file. What will make a good list so that eaisly on ecan call them.

Attachments:
POSTED BY: Alexia werk
5 Replies
Posted 10 years ago

please see the second data file also

Attachments:
POSTED BY: Alexia werk
Posted 10 years ago

.

In[1]:= raw = Import["2015-06-25_TemperatureValues.xls"];
data = Map[Flatten[{AbsoluteTime[#[[1]]], Rest[#]}] &, Drop[First[raw], 7]]

Out[2]= {{-86399.96300000000000000, 32.17, 34.96},
 {-86399.92600000000000000, 32.17, 34.96},
 {-86399.8890000000000000, 32.17, 34.96},
 {-86399.8520000000000000, 32.17, 34.96},
 {-86399.8150000000000000, 32.17, 34.96},
 {-86399.7780000000000000, 32.17, 34.96},
 {-86399.7410000000000000, 32.17, 34.96},
 {-86399.7040000000000000, 32.17, 34.96},
 {-86399.6670000000000000, 32.17, 34.96},
 {-86399.6300000000000000, 32.17, 34.96},
 {-86399.5930000000000000, 32.17, 34.96},
 {-86399.5560000000000000, 32.17, 34.96}}

In[3]:= g1 = Show[ListPlot[Map[{#[[1]], #[[2]]} &, data]],
  ListPlot[Map[{#[[1]], #[[3]]} &, data]]]

enter image description here

In[4]:= raw = Import["testdata.txt"];
data = Map[Flatten[{AbsoluteTime[#[[1]]], ToExpression[Rest[#]]}] &, 
  Map[StringSplit[#, "\t"] &, StringReplace[Rest[StringSplit[raw, "\n"]], "," -> "."]]]

Out[5]= {{3629059200, 37, 32.17, 34.96},
 {3629059200, 74, 32.17, 34.96},
 {3629059200, 111, 32.17, 34.96},
 {3629059200, 148, 32.17, 34.96},
 {3629059200, 37, 32.17, 34.96},
 {3629059200, 74, 32.17, 34.96},
 {3629059200, 111, 32.17, 34.96},
 {3629059200, 148, 32.17, 34.96},
 {3629059200, 185, 32.17, 34.96},
 {3629059200, 222, 32.17, 34.96},
 {3629059200, 259, 32.17, 34.96},
 {3629059202, 333, 32.17, 34.96},
 {3629059203, 370, 32.17, 34.96}}

In[6]:= g2 = Show[ListPlot[Map[{#[[1]], #[[3]]} &, data]],
  ListPlot[Map[{#[[1]], #[[4]]} &, data]]]

enter image description here

POSTED BY: Bill Simpson
Posted 10 years ago

its good but time data looks so big number.

POSTED BY: Alexia werk
Posted 10 years ago

Your spreadsheet has December 31 year 1899 with times over 1/5 of one second.

Your text file has no month or day or year with times over 1/9 of one second.

If your month day year and time were so useful number then graph is better.

Or subtract date and time of first row from all other rows and get graph that starts at zero.

POSTED BY: Bill Simpson
Posted 10 years ago

sorry i do not understand this time stuff. I should read about this. One more question how to find here curve derivatives?

POSTED BY: Alexia werk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract