5
>> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)' ans = 1 4 9 14 14 8

>> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

  • View
    217

  • Download
    3

Embed Size (px)

Citation preview

Page 1: >> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

>> x1=[1,2,2]; x2=[1,2,3,4];>> conv(x1,x2)

ans =

1 4 9 14 14 8>> circonvt(x1,x2,4)'

ans =

15 12 9 14

>> circonvt(x1,x2,5)'

ans =

9 4 9 14 14

>> circonvt(x1,x2,6)'

ans =

1 4 9 14 14 8

Page 2: >> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

>> x1=[1,2,2]; x2=[1,2,3,4];>> conv(x1,x2)

ans =

1 4 9 14 14 8>> circonvt(x1,x2,4)'

ans =

15 12 9 14

>> x1=[1 -1 2 1]; x2=[1 2 3 4 5];>> conv(x1,x2)

ans =

1 1 3 6 9 6 14 5

>> circonvt(x1,x2,5)'

ans =

7 15 8 6 9

Page 3: >> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

>> n=0:9;h=[1,0,-1];>> n=0:9;x=n+1;h=[1,0,-1];>> conv(x,h)

ans =

1 2 2 2 2 2 2 2 2 2 -9 -10

>> x1=[0,0,1:4]; y1=circonvt(x1,h,6)'

y1 =

-3 -4 1 2 2 2

>> x2=[3:8]; y2=circonvt(x2,h,6)'

y2 =

-4 -4 2 2 2 2

>> x3=[7:10,0,0]; y3=circonvt(x3,h,6)'

y3 =

7 8 2 2 -9 -10

Page 4: >> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

>> x=[1 2 3 4];>> X=DFT(x);>> X=DFT(x',4);>> conj(DFT(conj(X),4))/4

ans =

1.0000 - 0.0000i 2.0000 - 0.0000i 3.0000 - 0.0000i 4.0000 + 0.0000i

Page 5: >> x1=[1,2,2]; x2=[1,2,3,4]; >> conv(x1,x2) ans = 1 4 9 14 14 8 >> circonvt(x1,x2,4)' ans = 15 12 9 14 >> circonvt(x1,x2,5)' ans = 9 4 9 14 14 >> circonvt(x1,x2,6)

>> x=[1 2 3 4];>> X=fft(x,4);>> conj(fft(conj(X),4))/4

ans =

1 2 3 4

>> ifft(X,4)

ans =

1 2 3 4