I'm trying to analyse data with Mathematica. I have a big array with various columns representing timestamps and then lots of data. I have some code that will produce a list of timestamps when the data is bad and should be deleted.
I would like to be able to take any new set of data and identify the position of any timestamps that are in the list of bad data and should be deleted.
To put it bit more precisely, given list A and list B is there way to output the position where of any member of list A occurs in list B.
I have some terrible code that does the job, but I'm sure there is a nicer way to do this with a function that just has two lists as the input. In this code datatimelist is the time stamps of the new data, and glitchtimelist is the previously identified timestamps of bad data from a different experiment.
datatimelist = thedata[[All, 3]] match[x_] := MemberQ[glitchtimelist, x]; badpointlist = Position[Map[match, datatimelist], True]; datadeglitched = Delete[thedata, badpointlist];