Professional Documents
Culture Documents
h(0) = (1/m)+(r/(m*4/pi-1))
h(|m/4|) = (-r/m)*[(2*cos{(pi/4*r)*(1+4)}-cos{pi*(1-r)/4*r})]
THEORY:
The given function simply can be generated by computing the value of h at every n in a suitable
interval using the given formula:
We set the values of m=4 and r=0.1 before computation and iterate through a pre-declared vector
representing the values of n on both the positive and negative sides of the number line. The
values of the function at specific values of n=0 and n=|m/4| are then encompassed in the plot for
h(n), since, m and r have fixed values.
MATLAB CODE:
clc;
close all;
clear all;
m = 4;
r = 0.1;
n = -50:50;
for i = 1:length(n)
h(i) = ((4*r*n(i))*cos(pi*n(i)*(1+r)/m)+m*sin(pi*n(i)*(1-r)/m))/((1-(4*r*n(i)/m))^2 *
pi*n(i)*m);
end
stem(n,h)
xlabel('n');
ylabel('h(n)');
OUTUT WAVEFORM:
Result: The MATLAB program to generate the signal s(n)=2*n*(0.8*n) corrupted by the noise
d(n) resulting the signal x(n)=s(n)+d(n) is generated and downsample of corrupted signal was
also plotted.