Now that I am able to read in a file with HH:MM:SS values (the first element in each row), if I want to perform operations on the hours, minutes, and seconds, how do I read in hours, minutes, and seconds separately, while still reading in all of the other numeric fields in each row?
For example, with the data
16:40:15 1 2 3 4 5
16:40:35 6 7 8 9 10
I now want to define a new field called "seconds" and set it equal to hours*3600+minutes*60+seconds so that I can display the HH:MM:SS as just seconds (this allows me to do interpolation if needed on the other fields).
I'll end up with,
16 40 15 60015 1 2 3 4 5
16 40 35 60035 6 7 8 9 10
Which is, in order of column vectors, HOURS|MINUTES|SECONDS|TOTAL SECONDS|<value #1>|<value #2>|<value #3>|<value #4>|<value #5>| ...
For example, with the data
16:40:15 1 2 3 4 5
16:40:35 6 7 8 9 10
I now want to define a new field called "seconds" and set it equal to hours*3600+minutes*60+seconds so that I can display the HH:MM:SS as just seconds (this allows me to do interpolation if needed on the other fields).
I'll end up with,
16 40 15 60015 1 2 3 4 5
16 40 35 60035 6 7 8 9 10
Which is, in order of column vectors, HOURS|MINUTES|SECONDS|TOTAL SECONDS|<value #1>|<value #2>|<value #3>|<value #4>|<value #5>| ...