Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The program_2_4 will be attached in the dropbox link. https://www.dropbox.com/s/

ID: 1847609 • Letter: T

Question

The program_2_4 will be attached in the dropbox link.
https://www.dropbox.com/s/p6kn8df7btflxvo/Program_2_4%281%29.m

We would like to reduce the the size of the elements in the sequence d[n] while distorting the signal s[n] as little as possible. In other words, we would like to improve the signal to noise ratio of our measured sequence. Towards this end, the sequence x[n] is passed through a causal M - point MA filter; that is, the impulse response of the filter is Use Program_2_4.m, which is on Blackboard, to produce the output of such a filter. Your output should be similar the plots shown in Figure 2. Plot the output for various values of M and turn the plots in. Is it possible to reduce the noise and not distort the signal? What happens when M increases? Explain your plots.

Explanation / Answer

s=zeros(1,50);
n=0:49;
s=2*(n.*0.9.^n);
stem(s)
d=-0.5+rand(1,50);
x=s+d;
stem(x)
m=[5 10 15 20]; //include any values of M you want
l=length(m);
for i=1:l
M=m(i);
b=ones(1,M)/M; //filter coefficients
y=filter(b,1,x); //finds response
stem(y) //plotting the response
a=input('enter your code ') //enter any number to see response for M value
end