You found convolution htxt using three methods analytically

You found convolution (h(t)*x(t)) using three methods (analytically, graphically (area using rectangular approximation or quad), and MATLAB in-built function). h(t) = sin(pi t) (u(t) - u(t - 1)) x(t) = 1.5(u(t) - u(t - 1)) You found that the shape of the plot of h(t)*x(t) agrees in all the three methods but the magnitude does not, why so? Explain how those three methods calculate convolution.

Solution

>> t=0:0.1:10;
>> h=sin(pi*t).*(heaviside(t)-heaviside(t-1));
>> x=1.5*(heaviside(t)-heaviside(t-1));
>> z=conv(h,x)

z =

Columns 1 through 5

         0    0.2318    0.9044    1.9520    3.2720

Columns 6 through 10

    4.7353    6.1986    7.5187    8.5663    9.2389

Columns 11 through 15

    9.4706    9.2389    8.5663    7.5187    6.1986

Columns 16 through 20

    4.7353    3.2720    1.9520    0.9044    0.2318

Columns 21 through 25

    0.0000         0         0         0         0

Columns 26 through 30

         0         0         0         0         0

Columns 31 through 35

         0         0         0         0         0

Columns 36 through 40

         0         0         0         0         0

Columns 41 through 45

         0         0         0         0         0

Columns 46 through 50

         0         0         0         0         0

Columns 51 through 55

         0         0         0         0         0

Columns 56 through 60

         0         0         0         0         0

Columns 61 through 65

         0         0         0         0         0

Columns 66 through 70

         0         0         0         0         0

Columns 71 through 75

         0         0         0         0         0

Columns 76 through 80

         0         0         0         0         0

Columns 81 through 85

         0         0         0         0         0

Columns 86 through 90

         0         0         0         0         0

Columns 91 through 95

         0         0         0         0         0

Columns 96 through 100

         0         0         0         0         0

Columns 101 through 105

         0         0         0         0         0

Columns 106 through 110

         0         0         0         0         0

Columns 111 through 115

         0         0         0         0         0

Columns 116 through 120

         0         0         0         0         0

Columns 121 through 125

         0         0         0         0         0

Columns 126 through 130

         0         0         0         0         0

Columns 131 through 135

         0         0         0         0         0

Columns 136 through 140

         0         0         0         0         0

Columns 141 through 145

         0         0         0         0         0

Columns 146 through 150

         0         0         0         0         0

Columns 151 through 155

         0         0         0         0         0

Columns 156 through 160

         0         0         0         0         0

Columns 161 through 165

         0         0         0         0         0

Columns 166 through 170

         0         0         0         0         0

Columns 171 through 175

         0         0         0         0         0

Columns 176 through 180

         0         0         0         0         0

Columns 181 through 185

         0         0         0         0         0

Columns 186 through 190

         0         0         0         0         0

Columns 191 through 195

         0         0         0         0         0

Columns 196 through 200

         0         0         0         0         0

Column 201

         0

>>

 You found convolution (h(t)*x(t)) using three methods (analytically, graphically (area using rectangular approximation or quad), and MATLAB in-built function).

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site