How can I get the DFT of this function?

1 回表示 (過去 30 日間)
Omar Esau Pacheco Saavedra
Omar Esau Pacheco Saavedra 2020 年 4 月 1 日
回答済み: Nikhil Sonavane 2020 年 4 月 6 日
How can I get the DFT of this function?
at 3, 7, 16, 128 points and save the results in vectors.
sorry if my question is silly, but i dont have schoolbecause covid 19
x(n) = u(n) − u(n − 4).

回答 (1 件)

Nikhil Sonavane
Nikhil Sonavane 2020 年 4 月 6 日
You may refer to the following code and make changes as per your requirements-
n = 512;
x=[1 1 1 1];
y = fft(x,n);
m = abs(y);
f = (0:length(y)-1)*100/length(y);
You may also refer to the documentation of fft.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by