how to plot the magnitude of x(k) in matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
x(k)= 4j exp(-6*pi*j*k/N)
where 0 <= k <= N-1 and x(k) be N-point DFT of the length N sequence
1 Kommentar
Akzeptierte Antwort
Rik
am 24 Okt. 2017
You already have a function, you just need to calculate the magnitude, which is just the abs function. The thing is, you can see beforehand that this is a useless exercise, because it will always be 4. The exponent part doesn't influence the magnitude, so k has no influence on the magnitude.
N=20;
x_mag=@(k) abs(4j*exp(-6*pi*1j*k/N));
fplot(x_mag,[0,N-1])
(you can also use linspace and plot)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!