I have a vector of times, and there are a number of places where the time is duplicated. The time vector is only one column of data from a text file, there are several other vectors (velocity, position, etc) from the same data text file. How do I go about deleting the duplicate entries based on time, while maintaining all the other entries? Say:
if (time[j] == time[j + 1]
{
do stuff...
}
I actually have several vectors, so I will be deleting the duplicate entries from them as well. I need to preserve the order of data in the other vectors (they are not necessarily consecutive.)
I only want to delete consecutive duplicate points.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…