how to filter quantization uncertainty
1 view (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
Star Strider
on 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])
0 Comments
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!