How do I use rmoutliers without using rmoutliers
4 views (last 30 days)
Show older comments
I have to do the rmoutliers function for an assignment without using the rmoutliers function. I believe I need to use a while loop, but I am still unfamiliar with the syntax
Essentially for the while loop I want is to check each value in a vector and check to see if it is outside the threshold and an outlier, return the index and replace the value with []
The threshold is based off of the mean +- 3*std of the vector just like the rmoutliers function
This is the exact function I am trying to replicate:
5 Comments
Walter Roberson
on 22 Jan 2021
while true
calculate the current standard deviation
determine whether there are any current points
that are beyond the threshold based upon standard deviation
if there are none, exit the loop
otherwise there must be some. Delete them.
end
Answers (0)
See Also
Categories
Find more on Timetables 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!