This commit is contained in:
2025-09-16 17:13:34 -04:00
commit d7e53fcee1

17
Lab1.py Normal file
View File

@@ -0,0 +1,17 @@
import numpy as np
import matplotlib.pyplot as plt
t = np.arange(-8, 8, 1e-3)
xB = lambda t: (t>=0).astype(float) - (t>1).astype(float) \
+ (-t+2)*((t>1).astype(float) - (t>2).astype(float))
slide = 2
gain = 3
plt.figure(figsize=(10,12))
plt.subplot(5,1,1)
plt.plot(t, gain * xB(slide-t))
plt.grid()
plt.title(f'Vertical Translation/Gain => g xB(t) + vt')
plt.xlabel('t')
plt.show()