This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
def get_dominant_paths(Y_DD): | |
threshold = 0.1 * np.max(np.abs(Y_DD)) | |
M, N = Y_DD.shape | |
K_list = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
M = 4 | |
N = 4 | |
GAMMA = np.diag(np.exp(-1j * np.arange(M) * 2 * np.pi / M)) | |
DELTA = np.diag(np.exp(1j * np.arange(N) * 2 * np.pi / N)) | |
def gamma_deriv(GAMMA, n): | |
return np.diag((-np.arange(M) * 1j * 2 * np.pi / M))**n @ GAMMA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
x = np.arange(-10, 10, 0.01) | |
f = lambda x : x*x/4 | |
y = f(x) | |
x0 = np.abs(np.random.randn() * 5) # initial point | |
x_vals = [] | |
y_vals = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
Ts = 0.0001 | |
fs = 1 / Ts | |
t = np.arange(0, 1, Ts) | |
V_pi = 5 | |
V_bias = 2.5 | |
f_dither = 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
Ts = 0.0001 | |
fs = 1 / Ts | |
t = np.arange(0, 1, Ts) | |
V_pi = 5 | |
V_bias = 2.5 | |
f_dither = 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
NFFT = 16 | |
NCP = 4 | |
# Generate QPSK symbols | |
symbols = np.sign(np.random.randn(NFFT)) + 1j * np.sign(np.random.randn(NFFT)) | |
# LTI channel | |
# Generate h according to a power delay profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.signal import freqz | |
def solve(omega1, omega2, phi1, phi2): | |
# Let's formulate the equations accordingly | |
A = np.array([ | |
[-np.sin(phi1 + omega1), 0, np.sin(omega1), 0], | |
[-np.cos(phi1 + omega1), 0, np.cos(omega1), 1], | |
[0, -np.sin(phi2 + omega2), np.sin(omega2), 0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.signal import freqz | |
INPUT_OMEGAS = np.array([np.pi / 4, np.pi / 3]) | |
INPUT_PHIS = np.array([np.pi / 6, 2 * np.pi / 3]) | |
def solve(omega1, omega2, phi1, phi2): | |
# Let's formulate the equations accordingly | |
A = np.array([ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
# We always send +1 | |
delta_omega = 0.01 * np.pi | |
n = np.arange(100) | |
received_symbols = np.exp(1j * delta_omega * n) # AWGN here | |
#plt.scatter(np.real(received_symbols), np.imag(received_symbols)) | |
#plt.show() | |
quantized_points = np.array([1, -1, 1j, -1j]) |
NewerOlder