HM1_Aufgabenserie3/Schenk_Brandenberger_S3_Auf...

19 lines
317 B
Python
Raw Normal View History

2022-10-20 14:27:15 +02:00
import numpy as np
import matplotlib.pyplot as plt
import math
def h(x):
2022-10-20 14:44:10 +02:00
return math.sqrt(100 * math.pow(x,2) - 200 * x + 99)
2022-10-20 14:55:43 +02:00
2022-10-20 14:44:10 +02:00
xStep = math.pow(10,-7)
2022-10-20 14:55:43 +02:00
xStart = 1.1 + xStep
xStop = 1.31
2022-10-20 14:44:10 +02:00
x = np.arange(xStart,xStop + xStep,xStep)
y = [h(x_val) for x_val in x]
plt.plot(x,y, label='h(x)')
2022-10-20 14:55:43 +02:00
plt.legend()
2022-10-20 14:44:10 +02:00
plt.show()