How to write this function in MATLAB

1 visualizzazione (ultimi 30 giorni)
Yash Patel
Yash Patel il 11 Feb 2021
Risposto: Drishan Poovaya il 24 Mar 2021
Hello , I am trying to calculate the DTFT of a sequence and compare it using freqz function....
The DTFT of my sequence is
How do I program this in MATLAB ....
w is vectorized quantity
L = 40

Risposte (1)

Drishan Poovaya
Drishan Poovaya il 24 Mar 2021
I understand you want to write this function in MATLAB with w as a vector. The code below should accomplish this
Pw = L*exp(-1i*w*(L-1)/2).*(sinc(w*L/(2*pi))./sinc(w/(2*pi)));

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by