Subject DiscreteTime Signals and Systems Title Applied Digit

Subject: Discrete-Time Signals and Systems
Title: Applied Digital Signal Processing
Author(s): Manolakis
ISBN: 9780521110020
>> You can readily find a free PDF download by Googling it.

Chapter: 7
Problem: 43
>> If applicable, simply make use of a transform table as the basis of the solution.
>> Please write clearly. Print is preferred.
>> Show MATLAB code used.

Solution

(a)

Answer:

clc;
g=input(\'Enter the sequence 1:\');
h=input(\'Enter the sequence 2:\');
N1=length(g);
N2=length(h);
N=max(N1,N2);
N3=N1-N2;
if(N3>0)
    h=[h,zeros(1,N3)];
else
    g=[g,zeros(1,-N3)];
end
for n=1:N;
    y(n)=0;
    for i=1:N;
        j=n-i+1;
        if(j<=0)
            j=N+j;
        end
        y(n)=[y(n)+(g(i)*h(j))];
    end
end
disp(\'The resultant is\');y
subplot(2,1,1);
stem(y);
xlabel(\'N->\');
ylabel(\'Amplititude->\');

(b)

Answer:

function Y = circonv(g,h)

% This Function Gives the circuar Convolution of two sequences which are

% of equal length. Y is the output for the inputs g & h respectively,

% Y = circonv(g,h) and both g & h must be of equal lengths.

% See also SSBAM

n = length(g);

if(length(g) == length(h))

for i = 1:n

    H(i:n,i) = (h(1:n-i+1))\'; %#ok<AGROW>

   if(i>1)

     H(1:i-1,i) = (h(n-i+2:n))\'; %#ok<AGROW>

   end

end

Y = (H*g\')\';

else

    display(\'Circular Convolution not Possible as Inputs are of Different Lengths\');

end

Subject: Discrete-Time Signals and Systems Title: Applied Digital Signal Processing Author(s): Manolakis ISBN: 9780521110020 >> You can readily find a fre
Subject: Discrete-Time Signals and Systems Title: Applied Digital Signal Processing Author(s): Manolakis ISBN: 9780521110020 >> You can readily find a fre

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site