Rowan-Classes/8th-Semester-Spring-2025/clinic-consultant/examples/example_plot.py
Aidan Sharpe a8d26aeea6 Bio lab 1
2025-01-27 15:39:08 -05:00

21 lines
266 B
Python

import numpy as np
import matplotlib.pyplot as plt
def main():
f_s = 6
T_s = 1/f_s
t = np.arange(-1, 1, T_s)
f = 3
omega = 2*np.pi*f
signal = np.cos(omega*t)
plt.stem(t, signal)
plt.show()
if __name__ == "__main__":
main()