Bio lab 1
This commit is contained in:
@@ -3,17 +3,18 @@ import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def main():
|
||||
#x_axis = np.linspace(-5, 5, 100)
|
||||
f_s = 3
|
||||
f_s = 6
|
||||
T_s = 1/f_s
|
||||
t = np.arange(-1, 1, T_s)
|
||||
|
||||
x_axis = np.arange(-5, 5, T_s)
|
||||
x_axis_2 = np.linspace(-5, 5, len(x_axis))
|
||||
y_axis = x_axis**2
|
||||
f = 3
|
||||
omega = 2*np.pi*f
|
||||
signal = np.cos(omega*t)
|
||||
|
||||
plt.stem(x_axis, y_axis)
|
||||
plt.stem(t, signal)
|
||||
plt.show()
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -13,7 +13,7 @@ Open VS Code, and click File$\to$Open Folder.
|
||||
|
||||

|
||||
|
||||
Then, create and open a folder for your Python example files. This will be the folder we work in for all exercises. I recommend that you use a separate folder for your lab-related Python files, maybe even a separate folder for each lab. Once you click "Select Folder" you may get a pop-up asking you if you trust this folder. Its your folder, so you can trust it no problem.
|
||||
Then, create and open a folder for your Python example files. This will be the folder we work in for all exercises. I recommend that you use a separate folder for your lab-related Python files, maybe even a separate folder for each lab. Once you click "Select Folder" you may get a pop-up asking you if you trust this folder. It's your folder, so you can trust it no problem.
|
||||
|
||||

|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user