using the ifft function in MATLAB - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

using the ifft function in MATLAB

bclarkbclark Posts: 1Member
I have having trouble getting the following problem to work-can anybody help me?


problem:Obtain the 1024-point inverse FFT of a sequence of numbers whose imaginary parts are
all zero, and the real parts are the following:
b(1)=b(1023)=0.5
b(3)=b(1021)=0.1
b(i)=0.0 for all other i in the range [0,1023]


Here is my code:

n=1024; %Matrix size

X=zeros(n,1);
X(2.1)=.5;
X(1024,1)=.5;
X(4,1)=.1;
X(1022,1)=.1;
Y=ifft(X,n);
figure
plot(Y)
%Fs = 10.24e3;
%t = [0:1023]/Fs;
figure;
plot(t,abs(Y))


Anybody help?
Sign In or Register to comment.