我正在使用超声波传感器通过python读取水位。有5%的机会从传感器获取错误的值。 5%不是实际值的变化。它实际上是获得错误价值的百分比。这会导致同一位置的所有正确和错误值。如何从数据中删除5%的错误值?数据样本看起来像这样。
45.1,45.3,45.4,45.7,46.6,47.1,47.9,48.1,48.4,48.8,49.1,49.2,49.1,46.2,45.2,45.7,45.8,43.6,45.6,44.6
这些是20个值。这20个值中有一个(5%)是错误的,我想排除。
谢谢!