The two length - N sequences arc given by h [n] = [2, 2, 1, 1] and g [n] = [1, 2
ID: 2082689 • Letter: T
Question
The two length - N sequences arc given by h [n] = [2, 2, 1, 1] and g [n] = [1, 2, 0, 1]. Write a MATLAB program to compute 4 - point circular convolution of g [n] and h [n]. Using (a) Matrix form approach (b) DFT - based approach (Figure 1). 0 lessthanorequalto n lessthanorequalto 3 The given two sequences arc given by h [n] = [2, 1] and g [n] [5, 4, 6]. Write a MATLAB program to compute circular convolution of g [n] and h [n]. Using (a) Matrix form approach (b) DFT - based approach (figure 1). Consider a linear shift invariant system with unit impulse response h [n] = [1, 2, 0, 1, - 1, 3] and input g [n] - u [n] - u [n - 4]. Write a MATLAB program to compute the output y (n) of the system by evaluating an appropriate circular convolution of x (n) and h (n) using (a) Using MATLAB function conv (b)DFT - based approach (Figure 2).Explanation / Answer
>>CIRCULAR CONVOLUTION USING MATRIX METHOD
>>Clc;
>>h(n)=[2,2,1,1];
>>g(n)=[1,2,0,1];
>>X=Zeros(0);
>>g_index=1;
>>N=Length(h);
>>y=Zeros(0);
>>disp('h(n)=');
>>disp(h);
>>disp('g(n)=');
>>disp(g);
>>subplot(4,1,1);
>>stem(x);
>>title('Signal One:h(n) ');
>>Subplot(4,1,2);
>>stem(g);
>>title('Signal Two :g(n)');
>>temp=0;
>>for i=1:N;
>> X(i,1)=g(i);
>>end;
>> for i=2:N;
>>g=Circshift(g,[0,1]);
>> for j=1:N;
>>X(j,i)=g(j);
>>end;
>>end;
>> disp('X=>>');
>>disp(X);
>>for i=1:N;
>>for j=1:N;
>>temp=temp+X(i,j)*x(j);
>>end;
>>y(i)=temp;
>>temp=0;
>>end;
>>disp('Circular convolution:y(m)==>');
>>disp(y);
>>Subplot(4,1,3);
>>stem(y);
>>title('Circular Convolution:y(m)');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.