Difference between revisions of "File:Takagiplot.png"
From specialfunctionswiki
(<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 takagi(x): return nsum(lambda k: distfnc((2.0**k)*x)/(2**k),[0,inf]) x=np.arange(0.0,...) |
(Tom uploaded a new version of "File:Takagiplot.png") |
(No difference)
|
Latest revision as of 03:14, 6 July 2016
#!/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 takagi(x): return nsum(lambda k: distfnc((2.0**k)*x)/(2**k),[0,inf]) x=np.arange(0.0,1.0,0.00001); f=np.vectorize(takagi) y=f(x) plt.xlabel('x') plt.ylabel('Takagi(x)') plt.plot(x,y,linewidth=0.5) plt.savefig('takagiplot.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:14, 6 July 2016 | 875 × 885 (46 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 takagi(x):... | |
17:12, 22 January 2016 | 800 × 600 (27 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 takagi(x): return nsum(lambda k: distfnc((2.0**k)*x)/(2**k),[0,inf]) x=np.arange(0.0,... |
- You cannot overwrite this file.
File usage
The following page links to this file: