how can I get fast Fourier transform of a signal from a continuous time ?

5 ビュー (過去 30 日間)
ADNAN KIRAL
ADNAN KIRAL 2018 年 11 月 28 日
コメント済み: ADNAN KIRAL 2018 年 12 月 3 日
Hi,
first, do I need to discretize the signal and then get "fft" in MATLAB?
Or any suggestion?
thanks
  12 件のコメント
David Goodmanson
David Goodmanson 2018 年 12 月 3 日
The code you have is the right idea, but not correct.
f0 = (whatever)
t = 0:.01:30;
y = sin(2*pi*f0*t);
will give you a signal that you can take the fft of. I used f0 instead of f so that the fixed frequency of the sine wave will not be confused with the frequency array that is associated with the output of fft. That frequency array is
fs = 1/.01; % sampling frequency 100 Hz in this case
n = length(y);
f = ((0:n-1)/n)*fs;
ADNAN KIRAL
ADNAN KIRAL 2018 年 12 月 3 日
I see, thanks @ David.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by