scipy.integrate.
romb#
- scipy.integrate.romb(y, dx=1.0, axis=-1, show=False)[Quelle]#
Romberg-Integration unter Verwendung von Funktionsstichproben.
- Parameter:
- yarray_like
Ein Vektor mit
2**k + 1gleichmäßig verteilten Stichproben einer Funktion.- dxfloat, optional
Der Stichprobenabstand. Standard ist 1.
- axisint, optional
Die Achse, entlang der integriert werden soll. Standard ist -1 (letzte Achse).
- showbool, optional
Wenn y ein einzelnes 1D-Array ist, wird, wenn dieses Argument True ist, die Tabelle mit der Richardson-Extrapolation aus den Stichproben ausgegeben. Standard ist False.
- Rückgabe:
- rombndarray
Das integrierte Ergebnis für die Achse axis.
Siehe auch
quadadaptive Quadratur mit QUADPACK
fixed_quadGauß-Quadratur mit festem Ordnung
dblquaddoppelte Integrale
tplquaddreifache Integrale
simpsonIntegratoren für abgetastete Daten
cumulative_trapezoidkumulative Integration für abgetastete Daten
Beispiele
>>> from scipy import integrate >>> import numpy as np >>> x = np.arange(10, 14.25, 0.25) >>> y = np.arange(3, 12)
>>> integrate.romb(y) 56.0
>>> y = np.sin(np.power(x, 2.5)) >>> integrate.romb(y) -0.742561336672229
>>> integrate.romb(y, show=True) Richardson Extrapolation Table for Romberg Integration ====================================================== -0.81576 4.63862 6.45674 -1.10581 -3.02062 -3.65245 -2.57379 -3.06311 -3.06595 -3.05664 -1.34093 -0.92997 -0.78776 -0.75160 -0.74256 ====================================================== -0.742561336672229 # may vary