Is there an easy way to filter a 2-d array based on the values of one of the fields. In my attached VI the output array has the following format:
TimeStamp Ident Frame Type Bytes Data
10:57:07.621 3AD00016 CAN Data Frame 8 0000000000000000
10:57:07.622 3AD00017 CAN Data Frame 8 000005E000000000
10:57:07.624 3AD00018 CAN Data Frame 8 0000000003300000
10:57:07.625 2DC00000 CAN Data Frame 8 0000000000000000
10:57:07.626 3AD00019 CAN Data Frame 4 0000030000000000
I would like to delete any rows that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the above data the fourth row would be deleted. The only way I can see to do it is to form a 1-d array. Is there a better approach?
Solved! Go to Solution.
you can sort your data by the Ident column. Search the latest valid value in your array and create a subset of all data before it.
I know how to do the sort, but I'm not sure of an easy way to do the search.
after you have sorted your data, you can use the InRange Function. Combined with a "search 1D Array" you'll get the range you really want.