필터 지우기
필터 지우기

FFT to represent Aliasing Problem

조회 수: 21 (최근 30일)
nazneen
nazneen 2014년 5월 30일
편집: Rick Rosson 2014년 6월 2일
I have an sinusoidal signals ranging from 1 to 5 KHz and they are being sampled at 1500 Hz . I need to show the aliased spikes that fall in a LP filter of 1 kHz. Can fft be used ? I am trying a simple fft problem first but i cannot get the xasis correct. My code is :
f = input ('Enter the analog frequencies: ');
fs = input ('Enter the Sampling frequency: ');
Ts = 1/fs;
Ns = 512
t = [0:Ts:Ts*(Ns-1)];
x = sin(2*pi*f*t);
X = fft(x,Ns)/Ns;
xdft = fftshift(X);
plot(abs(xdft))

채택된 답변

Rick Rosson
Rick Rosson 2014년 6월 2일
편집: Rick Rosson 2014년 6월 2일
fc = f;
df = fs/Ns;
f = -fs/2:df:fs/2-df;
plot(f,abs(xdft);

추가 답변 (0개)

카테고리

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