フィルターのクリア

how do i take 64 samples from a sine wave and perform 256 point DFT on that?

7 ビュー (過去 30 日間)
olivani
olivani 2012 年 12 月 9 日
Hi , I am supposed to take 64 samples from a sine wave and perfrom 256 point DFT how can i do that..
please check if this code is correct
%%%%%%%%%%%%%%%
Fs = 30; % Sampling frequency
t = 0:1/Fs:1; % Time vector of 1 second
n = 64;
f = 8;
x = cos(2* pi*t*f*n);

回答 (2 件)

Rick Rosson
Rick Rosson 2012 年 12 月 11 日
編集済み: Rick Rosson 2012 年 12 月 11 日
Fs = 30;
dt = 1/Fs;
N = 64;
t = dt*(0:N-1)';
Fc = 8;
x = cos(2*pi*Fc*t);
M = 256;
...
...

Rick Rosson
Rick Rosson 2012 年 12 月 11 日
>> doc fft
>> doc fftshift

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by