Last active
January 25, 2023 11:44
-
-
Save OmarAlkousa/e3fb07ab6d2f45726de5c02e39a50db4 to your computer and use it in GitHub Desktop.
This gist is to represent how to generate a simple random signal using numpy package and plot the results using matplotlib.
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 the required packages | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.style.use('seaborn-poster') | |
%matplotlib inline | |
# Generate a random signal with length 10 | |
random_signal = np.random.rand(100) | |
# Plot the results | |
plt.plot(random_signal) | |
plt.xlabel('samples') | |
plt.ylabel('amplitude') | |
plt.title('Noise Signal') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment