MATLAB PROGRAM FOR THE GENERATION OF LINEARCONVOLUTION:
To write a program for the
generation of Linear convolution for the given sequences by using MATLAB.
Step 1:
Start
Step 2: Read the first sequence
Step 3: Read the second sequence
Step 4: Perform convolution for both the sequences using conv() function
Step 5: Plot the sequence
Step 6: Display the output sequence
Step 7: Stop
Step 2: Read the first sequence
Step 3: Read the second sequence
Step 4: Perform convolution for both the sequences using conv() function
Step 5: Plot the sequence
Step 6: Display the output sequence
Step 7: Stop
clc;
x=input('Enter the
sequence 1:');
h=input('Enter the
sequence 2:');
y=conv(x,h);
figure;
subplot(3,1,1);
stem(x);
ylabel('Amplitude->');
xlabel('N->');
subplot(3,1,2);
stem(h);
ylabel('Amplitude->');
xlabel('N->');
subplot(3,1,3);
stem(y);
ylabel('Amplitude->');
xlabel('N->');
disp('The resultant
signals:');
FOR MORE DETAILS CLICK HERE
No comments:
Post a Comment