Do you have a rule that you can apply to define when a value should be ignored? (Above a certain value? distance from previous/next value?
If so, then the code could look like this:
badDataIndex = allData > 10^4;
allData = allData(~badDataIndex);
this could be done in one line as well:
allData = allData(allData<10^4);