how to filter quantization uncertainty
Afficher commentaires plus anciens
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!
Réponses (1)
Star Strider
le 21 Oct 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])
Catégories
En savoir plus sur Filter Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!