Rowan-Classes/8th-Semester-Spring-2025/clinic-consultant/labs/lab-1/lab1q3.py

22 lines
499 B
Python

"""
ECE 09351 - Digital Signal Processing
Lab 1 Question 3
Translated from MATLAB by Aidan Sharpe
Last Modified: January 18, 2025
"""
from sympy import simplify, fourier_transform, sinc
from sympy.abc import t, f
def main():
x = sinc(0.5*t) # Define x as sinc(0.5t) = sin(0.5t)/(0.5t)
X = simplify(fourier_transform(x, t, f)) # Evaluate the Fourier transform of x, converting from t domain to f domain
print(X)
if __name__ == "__main__":
main()