Remove outliers or noise from 1D GIS data

2 views (last 30 days)
NS
NS on 6 Sep 2017
Edited: John D'Errico on 6 Sep 2017
Hi,
I want remove outliers or noise from my 1D GIS data which contain elevation change. I use below code from one example of mathworks to do this but results its not spatially smooth. Kindly suggest me to solve this issue.
%%%%%%%
%Percentile based outlier
% nth and ith percentile
percntiles = prctile(z,[10 90]);
outlierIndexes = z < percntiles(1) | z > percntiles(2);
%Extract outlier values
outliers = z(outlierIndexes);
%Extract non-outlier values
nonOutliers = z(~outlierIndexes);
%%%%%%%
Thanks
  2 Comments
KSSV
KSSV on 6 Sep 2017
Have a look on inbuilt function smooth in matlab.
John D'Errico
John D'Errico on 6 Sep 2017
Edited: John D'Errico on 6 Sep 2017
Without seeing your data, it is terribly difficult to know what you are doing wrong. For example, the above scheme will do reasonably well if applied to data that has no significant trend in it, yet it will be useless other times. We cannot know what is the problem, without the data.
So please attach your data as a .mat file to a comment, or edit your question to do so. If you are reluctant to post the data itself so we can use it, then attach a plot.

Sign in to comment.

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!