altenbach, as usual, your programming is really easy to follow. OK, so here is the last piece of the puzzle. I actually have two arrays: one is a helium concentration, and the other is a helium flow. My flow values are always good, but as I said before, there are sometimes bad values in the concentrration array. SO, what I want to do is to eliminate the flow element that corresponds to any bad concentration element. Hmmm, sounded like a good idea when I did it Anyway, you can see that the result that I currently have is that the filtered flow array is simply the last n elements of the raw flow array, n being equal to the delta between the array size of the raw concentration and the filtered concentration arrays. I hope I haven't managed to confuse you with that nonsense.
Basically, if I drop 5 elements from the raw concentration array, due to their not having passed through the filter, then I show the last 5 flow values in the filtered flow array, rather than passing all but 5 of the values.
If 15 of 20 helium concentration values are good, then I pass the last 5 helium flow values, rather than the 15 values that correspond to the 15 good concentration values.
HELP! If I can't figure this out, I may just take the average of the good concentration values, and the average of all the flow values, and do the rest of my calculations based on averages, rather than calculating each value based on a known good concentration and a known good flow.