Posts

Showing posts with the label distributive

Verification of Commutative, Distributive and Associative Property of Linear Convolution in MATLAB

Image
  MATLAB Program to verify the linear convolution between two discrete sequences and also verify the Commutative, Distributive and Associative properties of linear convolution where, x1[n] = {1, 0 ,1,0}; x2[n] = {1,2, 1 ,2} & x3[n] = { 1 ,-1,1,-1} (underline indicates the value at the zero index). Copy and paste the code in the Editor to run the code. Program Code: clc; clear all; close all; n1 = input("\n enter the time index of x1: "); x1 = input(" enter the dicrete sequence x1: "); n2 = input("\n enter the time index of x2: "); x2 = input(" enter the dicrete sequence x2: "); n3 = input("\n enter the time index of x3: "); x3 = input(" enter the dicrete sequence x3: "); % Plot of three discrete sequences subplot(3,3,1); stem(n1,x1); xlabel('time index'); ylabel('amplitude'); title('discrete sequence of x1'); subplot(3,3,4); stem(n2,x2); xlabel('time index'); ylabel('amplitude'); tit...