Skip to content

Instantly share code, notes, and snippets.

@nihalpasham
Last active April 12, 2020 04:22
Show Gist options
  • Save nihalpasham/36f4066ffb33cd3889053d202d23f804 to your computer and use it in GitHub Desktop.
Save nihalpasham/36f4066ffb33cd3889053d202d23f804 to your computer and use it in GitHub Desktop.
DSSS - Visual comparison of spread Vs de-spread signals
x = np.linspace(0, 42.33, 2032)
y = np.sin(2 * np.pi * ((4+0)/42.33) * x)
print(len(x))
print(len(y))
z = np.multiply(y, us1)
mot = np.multiply(z, us1)
fig, (ax1, ax2, ax3) = plt.subplots(3, figsize=(20,20))
# fig.suptitle('Vertically stacked subplots')
ax1.plot(y)
ax1.set(xlabel='Sample Number', ylabel='Amplitude')
ax1.set_title('Data Wave', fontsize=12, fontweight="bold")
ax2.plot(z, 'tab:green')
ax2.set(xlabel='Sample Number', ylabel='Amplitude')
ax2.set_title('Mixed Wave', fontsize=12, fontweight="bold")
ax3.plot(mot, 'tab:red')
ax3.set(xlabel='Sample Number', ylabel='Amplitude')
ax3.set_title('Unmixed Wave', fontsize=12, fontweight="bold")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment