Remove a part of data and replace it with data to fit trend

2 vues (au cours des 30 derniers jours)
VISHNURAJ SREERAJ NAIR
VISHNURAJ SREERAJ NAIR le 9 Jan 2022
Commenté : Hiro Yoshino le 11 Jan 2022
Hello, can some one please help me with the removal of data in the photo. I tried all the outlier removals, smooth data and conventional funtions, but it is unable to detect.
  2 commentaires
KSSV
KSSV le 10 Jan 2022
You have to attach your data.
VISHNURAJ SREERAJ NAIR
VISHNURAJ SREERAJ NAIR le 10 Jan 2022
Apologies, I have attached now.

Connectez-vous pour commenter.

Réponses (1)

Hiro Yoshino
Hiro Yoshino le 10 Jan 2022
Try this. It removes the dent you see in the plot. Please note this also affect the both edges of the profile.
[cleanedData,outlierIndices,thresholdLow,thresholdHigh] = filloutliers(slip1,...
"linear","movmean",29000,"ThresholdFactor",1,"SamplePoints",T1);
It would also be a good idea to detrend first and then find the outliers by using isoutlier.
  1 commentaire
Hiro Yoshino
Hiro Yoshino le 11 Jan 2022
I found a better solution.
  1. decompose the profile into long-term, short-term and roughness profiles.
  2. detect outliers in roughness and replace them with other values (linear interpolation in this case)
  3. re-compose the new roughness back to the long and short profiles together
Here's the code:
[LT, ST, R] = trenddecomp(slip1);
plot(T1,LT,T1,ST,T1,R);
[Rnew,outlierIndices,thresholdLow,thresholdHigh] = filloutliers(R,...
"linear","quartiles","SamplePoints",T1);
slip1New = Rnew + LT + ST;
plot(T1,spring1,T1,slip1New);

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by