File:Convolution of box signal with itself.gif
Convolution_of_box_signal_with_itself.gif (474 × 145 pixels, file size: 77 KB, MIME type: image/gif, looped, 280 frames, 14 s)
Summary
Description | An animation displaying the process and result of convolving a box signal with itself. For each position in the resulting hat function the input functions and the multiplied input functions are shown, and the area which is integrated is marked. This work mimicks [1] but includes the source code and shows the result of the convolution in the same graph as the input functions. |
Date | 7/7/2010 |
Source | Own work |
Author | Brian Amberg |
![]() |
This chart was created with MATLAB. |
Matlab Code used to create this animation
%% Create folding of two rectangular impulses X=-2.8:0.001:2.8; F1=zeros(size(X)); F1(abs(X)<=0.5) = 1; F2=zeros(size(X)); F2(abs(X)<=0.5) = 1; clf [tmp zero_offset] = min(abs(X)); !rm -f /tmp/conv_box_box*.png integral=nan(size(X)); for offset_i=1:numel(X) offset=X(offset_i); shift=offset_i-zero_offset; F2_shifted = circshift(F2, [1 shift]); F2_shifted(1:min(shift, numel(X))) = 0; F2_shifted(end+shift:end) = 0; product = F2_shifted.*F1; integral(offset_i) = sum(product)/numel(X)*(X(end)-X(1)); if (mod(offset_i, 20)==0) area(X, product, 'facecolor', 'yellow'); hold on plot(X, F1, 'b', X, F2_shifted, 'r', X, integral, 'k', [offset offset], [0 2], 'k:') hold off axis([-2 2 0 1.1]) xlabel('t'); grid on legend('Area under f(t)g(t)', 'f(t)', 'g(t)', '(f*g)(t)'); axis equal drawnow set(gcf,'PaperPositionMode','auto') print('-dpng', '-r72', '-painters', sprintf('/tmp/conv_box_box_%06d.png', offset_i)); end end
Image Magicks convert commandline to create the gif:
convert -delay 5 -loop 0 conv_box_box_*.png conv_box_box.gif
Licensing
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 18:44, 7 July 2010 | ![]() | 474 × 145 (77 KB) | Rubybrian (talk | contribs) | Cropped the image and compressed it using the commandline <code> convert -layers Optimize -delay 5 -loop 0 conv_box_box_00*.png conv_box_box.gif </code> |
18:14, 7 July 2010 | ![]() | 587 × 159 (708 KB) | Rubybrian (talk | contribs) | {{Information |Description=An animation displaying the process and result of convolving a box signal with itself. For each position in the resulting hat function the input functions and the multiplied input functions are shown, and the area which is integ |
- You cannot overwrite this file.
- Edit this file using an external application (See the setup instructions for more information)
File usage on Commons
The following page links to this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
Last modified on 5 February 2013, at 20:35