init
This commit is contained in:
17
Lab1.py
Normal file
17
Lab1.py
Normal 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()
|
||||||
Reference in New Issue
Block a user