change ifft code to 'ifft' command

조회 수: 1 (최근 30일)
itsik
itsik 2011년 5월 20일
does someone's know how do i change this code to ifft command? (the ifft part at the code) thanks!!
N=10;
fs=1e6;
T=1e-3;
% random signal
bit=randint(20,1); % 20 bits 0 or 1 1 x 20
% serial-to-parallel converter
par=reshape(bit,2,10); % 2 x 10 2 bits for sym
% mapper
sym=par'*[2;1]; % multiplay for mapper 00-0 01-1 10-2 11-3
phase=[-3*pi/4,3*pi/4,-pi/4,pi/4];
phase_sym=phase(sym+1); % every sym gets phase for example pi/4 will get '3'
_*
% IFFT
for k=0:N-1
i=1;
for t=1/fs:1/fs:T
x(k+1,i)=cos((2*pi*k*t)/T+phase_sym(k+1))+j*sin((2*pi*k*t)/T+phase_sym(k+1));
i=i+1;
end
end
*_

답변 (3개)

Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011년 5월 20일
Are you saying that instead of using a loop to perfrom IFFT you are interested in using ifft() ?
Is this what you mean ?

itsik
itsik 2011년 5월 20일
yes exacly its possable? or maybe there is an option to make fft loop that converte bake the ifft loop?

Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011년 5월 20일
If you are looking to just find ifft then you can try the direct function available in Matlab ifft()
ifft(your signal/variable);
Hope this will help you

카테고리

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