Deleting Specific Points in a Wave
Wed, 11/07/2018 - 07:36 am
I am trying to delete specific unwanted points. I have two waves. I need to delete the "topwave" points when both topwave and botwave values !=2 or when it is not a NaN.
I know there is a deletepoints function but it seems to delete a range of points you select instead of checking for a condition and deleting them that way. I was going to replace the "topwave" points with 0, but I am histogramming the wave later and this results in a large bin around 0.
Thanks in advance!
Variable i, N = numpnts(Topwave)
Duplicate Topwave, IsolatedTop
for (i=0; i<N; i+=1)
if ((NumType(TopWave[i]) !=2) && (NumType(BotWave[i]) != 2))
deletepoints 0, N, IsolatedTop
// !=2 numtyp is not a NaN aka a real number
// If numtype of isolated top and bottom both have numbers, "deletes" the top where both top and bottom overlap