File:Fourier31.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(812 × 612 pixels, file size: 212 KB, MIME type: image/gif, looped, 16 frames, 6.4 s)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
Magyar: A négyszögjel közelítése Fourier-sorral 31 tagig.
English: The Fourier series approximation of a square wave.
Date
Source Own work
Author Harp
 
This plot was created with Matplotlib.

The separate pictures was made with this program (fourier.py):

#!/usr/bin/env python
# coding: utf-8
from __future__ import division

import pylab
from pylab import show, plot, linspace
from pylab import zeros
from pylab import sin, pi

def fourier(n=15):
    x = pylab.linspace(-pi, pi, 1024)
    y = pylab.zeros(1024)
    pylab.grid(False)
    pylab.hold(False)
    for i in range(1,n+1,2):
        y += sin(i*x)/i
    pylab.plot(x,4/pi*y, "b")
    pylab.title(u"Fourier series approximation of square wave, %02d addends" %n)
    pylab.savefig("fourier%02d.png" % n)
    #pylab.show()

if __name__ == "__main__":
    for i in range(1,33,2):
        fourier(i)

Then thise pictures was unified with ImageMagick into one gif as follows:

  convert -delay 30 -loop 0 *.png fourier.gif

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current10:00, 25 September 2012Thumbnail for version as of 10:00, 25 September 2012812 × 612 (212 KB)Harp (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: