Remove 2D points that exceed std dev in either axis
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ben
el 7 de Oct. de 2015
I have a bunch of 2D points. I want to find the truncated mean and the standard deviation in each dimension based on the truncated data, then keep the points that are within a standard deviation of either the x-mean or the y-mean.
What I've done so far is to create two copies of the data, one sorted on x and the other on y. Then, I cut off some threshold percentage from the top and bottom of each of these copies, and find the mean and standard deviation of each. I then find the data in each copy that is within a standard deviation of this truncated mean for the given copy. That is, if it's the x-sorted copy, find the points that are within a standard deviation of the truncated x mean. Now, I want to keep the points that are in either copy, but I need them to be in the same order as the original data. How would this be done?
0 comentarios
Respuesta aceptada
Thorsten
el 7 de Oct. de 2015
Editada: Thorsten
el 7 de Oct. de 2015
You can determine the cut-off threshold on the sorted data but remove the values from the top and the bottom in the unsorted data. Note that you have to identify indices where both x and y are valid, and change x and y with these indices. Otherwise you end up with x and y values that to not match.
For further advice please post your code.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!