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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.