Skip to content
Snippets Groups Projects
Commit 78749c4b authored by dawehr's avatar dawehr
Browse files

Added median approximation to data analysis, used for sonar outlier filtering.

parent 4519ed71
No related branches found
No related tags found
No related merge requests found
function [ y ] = ApproxMedFilt( x, eta)
%APPROXMEDFILT Summary of this function goes here
% Detailed explanation goes here
mean = x(1);
med = x(1);
y = zeros(size(x));
for i = 1:length(x)
mean = mean + (eta * (x(i) - mean));
med = med + (eta * sign(x(i) - med));
y(i) = med;
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment