필터 지우기
필터 지우기

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 CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by