Signals and Systems Lab Report – Ensemble & Median Filtering

Searching for ensemble and median filtering tasks for your signals and systems lab report?

I’ve got you covered!

This post list two MATLAB codes and their outputs that represent the ensemble and median filtering concepts in Signals & System.

Task 1: Ensemble

MATLAB Code

r=50

m=0:r-1;

s=2*m.*(0.9.^m);

d=rand(r,1)-0.5;

x1=s+d’;

stem(m,x1,’g’)

xlabel (‘Time’)

ylabel(‘Amplitude’)

title(‘Noisy Signal’)

pause

for n=1:50

    d=rand(r,1)-0.5

    x=s+d’;

    x1=x1+x

end

x1=x1/50

stem(m,x1,’r’)

xlabel(‘Time’)

ylabel(‘Amplitude’)

title(‘Ensemble Average’)

Task 2: Median Filtering

MATLAB Code

n=input(‘Median Filter Input’)

r=50;

a=rand(1,r)-0.4;

b=round(a);

m=0:r-1;

s=2*m.*(0.9.^m);

x=s+b;

y=medfilt1(x,3)

subplot(211)

stem(m,x,’r’)

axis([0 50 -1 8])

xlabel(‘Time’)

ylabel(‘Amplitude’)

title(‘Impulse Noise Corrupt Signal’)

subplot(212)

stem(m,y,’b’)

xlabel(‘Time’)

ylabel(‘Amplitude’)

title(‘Output of Median Filter’)

If you’re looking for more signals and systems lab reports, you can find them here: Learn Signals and Systems at Biomed Forum.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *