|
I have two sets of data. One where the data was collected every 15 minutes (Tension) and one where data was collected approximately every 33 seconds (Weight). The tension readings are exactly every fifteen minutes but the weight readings have variations of a few seconds +/-. The matrices are setup so time is in column 1 and the reading is in column 2. They look like this:
Tension=
[0 -0.282150000000000
0.250000000000000 -0.336100000000000
0.500000000000000 2.25360000000000
0.750000000000000 2.84710000000000
etc...]
and
Weight=
[0 1295.70000000000
0.00916666700000000 1295.77000000000
0.0183333330000000 1295.77000000000
0.0277777780000000 1295.94000000000
0.0366666670000000 1295.94000000000
etc...]
I am trying to find a way to associate a single weight value for each tension value. Thus what is the weight at time = 0 , 0.25, 0.5, etc... The problem is there aren't any weight values that are taken at exactly .25, .5, .75, etc... therefore it needs to be the closest value to each time. How would I set up a function to do this. There are 949 tension readings and 26449 weight readings.
|