Jump to content

File:Convolution of spiky function with box2.gif

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia
    Original file (468 × 135 pixels, file size: 76 KB, MIME type: image/gif, looped, 301 frames, 15 s)

    Summary

    Description
    English: An animation displaying the process and result of convolving a box signal with a spiky impulse response. 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 mimics Convolucion de entrada con respuesta al impulso.gif but includes the source code and shows the result of the convolution in the same graph as the input functions. The function used is e−t for t≥0 and 0 otherwise.
    Date
    Source Own work based on: Convolution of spiky function with box.gif by Brian Amberg
    Author Tinos
    GIF development
    InfoField
     This diagram was created with MATLAB.

    Source code

    % Create folding of rectangular impulse with spiky function
    
    clear
    
    X=-2.1:0.001:4;
    F1=exp(-X);
    F1(X<0)=0;
    F2=abs(X)<=0.5;
    clf
    
    mkdir('tmp');
    [tmp zero_offset] = min(abs(X));
    
    SyncFrames=[1 round(20.3366666*(1:numel(X)))];
    frame=1;
    integral=nan(size(X));
    for offset_i=1:numel(X);
      offset=X(offset_i);
      shift=offset_i-zero_offset;
      F2_shifted = circshift(F2, [0 shift]);
      product = F2_shifted.*F1;
      integral(offset_i) = sum(product)/numel(X)*(X(end)-X(1));
      
        if offset_i
            frame=frame+1;
            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 image
            axis([-1.6 3.1 0 1.1])
            xlabel('\tau & t');
            grid on
            legend('Area under f(\tau)g(t-\tau)', 'f(\tau)', 'g(t-\tau)', '(f\astg)(t)');
            print('-dpng','-r72',sprintf('tmp/conv_box_spike_%06d.png', offset_i));
            drawnow
      end
    end
    
    system('"C:\Program Files\ImageMagick-6.6.3-Q16\convert.exe" -layers Optimize -delay 5 tmp/conv_box_spike_*.png conv_box_spike.gif');
    delete('tmp/*');
    rmdir('tmp');
    

    Licensing

    Tinos, the copyright holder of this work, hereby publishes it under the following licenses:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    Attribution:
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
    You may select the license of your choice.


    This is a retouched picture, which means that it has been digitally altered from its original version. Modifications: Fixed asterisk, and put tau in.. The original can be viewed here: Convolution of spiky function with box.gif: . Modifications made by Tinos.

    Original upload log

    This image is a derivative work of the following images:

    • File:Convolution_of_spiky_function_with_box.gif licensed with Cc-by-sa-3.0, GFDL
      • 2010-07-07T18:41:06Z Rubybrian 475x144 (108640 Bytes) Cropped the image and optimized the output for size using convert -layers Optimize -delay 5 -loop 0 conv_box_spike_*.png conv_box_spike.gif
      • 2010-07-07T18:22:54Z Rubybrian 587x159 (1081595 Bytes) == Summary == {{Information |Description=An animation displaying the process and result of convolving a spiky signal with itself. For each position in the resulting hat function the input functions and the multiplied input fu

    Uploaded with derivativeFX

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    26 July 2010

    image/gif

    5624386068bae22e7921ba254f1e8bc3b6fafd2d

    77,585 byte

    15.050000000000079 second

    135 pixel

    468 pixel

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current10:12, 26 July 2010Thumbnail for version as of 10:12, 26 July 2010468 × 135 (76 KB)TinosSynchronised with Convolution_of_spiky_function_with_box2.gif.
    00:20, 26 July 2010Thumbnail for version as of 00:20, 26 July 2010469 × 143 (57 KB)Tinos{{Information |Description=An animation displaying the process and result of convolving a box signal with a spiky impulse response. For each position in the resulting hat function the input functions and the multiplied input functions are shown, and the a

    The following page uses this file:

    Global file usage

    The following other wikis use this file:

    Metadata