diff --git a/software/detectVectorFieldOutliersTFM.m b/software/detectVectorFieldOutliersTFM.m index e1a039f..ba3b0ed 100644 --- a/software/detectVectorFieldOutliersTFM.m +++ b/software/detectVectorFieldOutliersTFM.m @@ -135,13 +135,19 @@ % elseif n==1 && fitError % threshDist = 2*mean(distance2); % end + +% ----------- DeBugged by Waddah Moghram on 4/27/2019 threshDist = nanmean(distance2)+2*nanstd(distance2); -idxCloseVectors = distance2neighborhood_distance | isnan(distance2); -idxCloseEnoughVectors = distance2neighborhood_distance) | isnan(distance2); +idxCloseEnoughVectors = (distance2threshold)])); outlierIndex = ind(idata(idCloseEnoughVectors(r>threshold))); -sparseIndex = ind(idata(idAwayVectors)); \ No newline at end of file +sparseIndex = ind(idata(idAwayVectors));