6th Semester Files
This commit is contained in:
19
6th-Semester-Spring-2024/DSP/Labs/Lab-01/lab1q1.py
Normal file
19
6th-Semester-Spring-2024/DSP/Labs/Lab-01/lab1q1.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from matplotlib import pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
PI = np.pi
|
||||
|
||||
fs = 100
|
||||
t = np.arange(0, 100/fs, 1/fs)
|
||||
|
||||
f2 = 80
|
||||
f1 = 40
|
||||
|
||||
x1 = np.cos(2*PI*f1*t)
|
||||
x2 = np.cos(2*PI*f2*t)
|
||||
|
||||
x = np.cos(2*PI*t/7) + np.sin(4*PI*t/7) + np.cos(16*PI*t/9)
|
||||
|
||||
plt.plot(np.arange(0,fs), abs(np.fft.fft(x1*x2)))
|
||||
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user