File:Vanderwaerdenplot.png
From specialfunctionswiki
Revision as of 17:44, 22 January 2016 by Tom (talk | contribs) (<pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * def distfnc(x): return min(x-floor(x),ceil(x)-x) def vanderwaerden(x): return nsum(lambda k: distfnc((10.0**k)*x)/(10.0**k),[0,inf]) x=np....)
Size of this preview: 593 × 600 pixels. Other resolutions: 237 × 240 pixels | 875 × 885 pixels.
Original file (875 × 885 pixels, file size: 35 KB, MIME type: image/png)
#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * def distfnc(x): return min(x-floor(x),ceil(x)-x) def vanderwaerden(x): return nsum(lambda k: distfnc((10.0**k)*x)/(10.0**k),[0,inf]) x=np.arange(0.0,1.0,0.00001); f=np.vectorize(vanderwaerden) y=f(x) plt.xlabel('x') plt.ylabel('van der Waerden(x)') plt.plot(x,y,linewidth=0.5) plt.savefig('vanderwaerdenplot.png')
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 03:21, 6 July 2016 | 875 × 885 (35 KB) | Tom (talk | contribs) | Category:Plot <pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 def distfnc(x): return min(x-floor(x),ceil(x)-x) def vanderwaerden... | |
17:44, 22 January 2016 | 800 × 600 (26 KB) | Tom (talk | contribs) | <pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * def distfnc(x): return min(x-floor(x),ceil(x)-x) def vanderwaerden(x): return nsum(lambda k: distfnc((10.0**k)*x)/(10.0**k),[0,inf]) x=np.... |
- You cannot overwrite this file.
File usage
The following page links to this file: