(* 畳み込みの確認    FILE:畳み込み.nb   2005/01/29 aito *)

y1 = {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

func = {4, 3, 2, 1}

yOut = ListConvolve[func, y1, 1]

{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

{4, 3, 2, 1}

{0, 0, 0, 0, 0, 0, 0, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0}

dat0 = Table[{i, y1[[i]]}, {i, 1, 40}] ;

dat1 = Table[{i, yOut[[i]]}, {i, 1, 40}] ;

ListPlot[dat0, PlotStyle -> {PointSize[0.02], RGBColor[1, 0, 0]}, PlotJoined -> False]

ListPlot[dat1, PlotStyle -> {PointSize[0.02], RGBColor[0, 0, 1]}, PlotRange->All, PlotJoined -> False]

[Graphics:HTMLFiles/ExConv_11.gif]

- Graphics -

[Graphics:HTMLFiles/ExConv_13.gif]

- Graphics -


Created by Mathematica  (August 18, 2005) Valid XHTML 1.1!