how to filter quantization uncertainty
Mostrar comentarios más antiguos
what is the best option to filter data with quantization uncertainty.if the curve bounces between two values before an edge. what I want is to have the mean of upper and lower value, which is not possible with med1 median filter, because the median of e.g. 99*upper value + 100*lower value is lower value and not the mean. what filter returns the mean while preserving sharp edges?
thanks for your help!
Respuestas (1)
Star Strider
el 21 de Oct. de 2015
Assuming I understand your Question, I would use a moving average filter. Experiment with the length to get the result you want:
s = [5 + randi([0 1], 1, 20) 4:-1:0]; % Create Data
t = 0:length(s)-1;
N = 4; % Filter Length
b = ones(1,N);
a = N;
sf = filtfilt(b, a, s);
figure(1)
plot(t, s)
hold on
plot(t, sf)
hold off
grid
axis([xlim 0 10])
Categorías
Más información sobre Filter Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!