Technical discussion about Matlab and issues related to Digital Signal Processing.
Post a new Thread
fft problems - bh10...@binghamton.edu - Sep 20 9:05:00 2005
Not sure I really understand your problem, but here's some code to help you out:
N=1024; %length of zero padded fft
x=0:100;
f=sin(2*x) + sin(3*x) + sin(4*x);
F=fftshift(abs(fft(f,N)));
w=-pi:2*pi/N:pi-(pi/N); %x scaled from -pi to pi
plot(w,F)
I hope that helps, feel free to e-mail me privately if you want an explanation.

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )