MATLAB: How to remove outliers from data set

dataoutlier

I have the data set:
flintLead=[0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 ...
4 4 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 8 8 9 10 10 11 13 18 20 21 22 29 43 43 104];
And I want to do one calculation using the whole set and one where I remove the points 20 and 104, but I don't know how to remove just those two points. I thought about doing something like:
without_ouliers = flintLead(1:64, 64:70)
but that's clearly not how it is done. Could someone explain how to remove them? All help is appreciated!

Best Answer

Try this:
flintLead=[0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 ...
4 4 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 8 8 9 10 10 11 13 18 20 21 22 29 43 43 104];
flintLead = flintLead(~((flintLead == 20) | (flintLead == 104)))
.