1: pour la position python
import sys
import numpy as np
import matplotlib.pyplot as plt
y = np.loadtxt('acs712_192us.m')
size = len(y)
x = np.arange(0, size)
out = []
lamb = 0.9
for i in range(len(y)):
if i == 0:
out.append(value) # value is what you want out[0] to be
else:
out.append(((1-lamb) * y[i]) + (lamb * out[i - 1]))
plt.plot(x, y)
plt.plot(x, out)
plt.show()
Elegant Eel