Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. plt.plot(x, y)
  2.  
  3. log_x = [np.log(xi) for xi in x]
  4. log_y = [np.log(yi) for yi in y]
  5.  
  6. plt.plot(log_x, log_y)
  7. plt.grid()
  8.  
  9. np.polyfit(log_x, log_y, 1)
  10.  
  11. array([-1.00082759, 0.32878786])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement