Created
December 4, 2013 09:26
-
-
Save rahul8590/7784727 to your computer and use it in GitHub Desktop.
Small Snippet used to calculate and plot the data set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xl = {0:0.329,4:0.632,6:0.795,8:0.917,10:0.981} | |
sum = [] | |
for n in range(1,21): | |
a1 = xl[4]**n - xl[0]**n | |
a2 = xl[6]**n - xl[4]**n | |
a3 = xl[8]**n - xl[6]**n | |
a4 = xl[10]**n - xl[8]**n | |
a5 = 1 - xl[10]**n | |
print "the intermediate values are " ,a1,a2,a3,a4,a5 | |
sum.append(a1*0 + a2*1 + a3*2 + a4*5.5 + a5*11) | |
print " for range " , n , "sum ==>", sum | |
x = range(1,21) | |
plt.plot(x,sum) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment