Power Electronics notes from March 19th

This commit is contained in:
2024-03-19 21:46:30 -04:00
parent 1b15385043
commit bd992d7643
43 changed files with 1355 additions and 33 deletions

View File

@@ -0,0 +1,27 @@
import numpy as np
import matplotlib.pyplot as plt
n = np.arange(0,200)
a = 0.9
# x[n] = a^n u[n]
x = a**n * np.heaviside(n, 1)
asums = np.zeros(len(n))
for i in range(len(n)):
asums[i] = np.sum(x[0:i])
# Plot settings for $x[n]$
plt.subplot(121)
plt.plot(n, x)
plt.xlabel("$n$")
plt.ylabel("$x[n]$", rotation="horizontal")
# Plot settings for sum of $x[n]$
plt.subplot(122)
plt.plot(n, asums)
plt.xlabel("$n$")
plt.ylabel("$\sum_n x[n]$", rotation="horizontal")
plt.show()