Advertisement
matbiz01

Untitled

Mar 24th, 2021
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. def calculateBasicPoints(n, czebyszew):
  2.     points = []
  3.     interval = (xn - x0) / (n - 1)
  4.     for x in range(n):
  5.         if czebyszew:
  6.             currX = 1/2 * (xn + x0) + 1/2 * (xn - x0) * cos((2 * (x + 1) - 1) / 2 / n * pi)
  7.         else:
  8.             currX = x0 + x * interval
  9.         points.append([currX, getOrigValues(currX)])
  10.     return points
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement