필터 지우기
필터 지우기

problem to make fft

조회 수: 1 (최근 30일)
itsik
itsik 2011년 6월 6일
hello i have this code and i want to make the fft for it to make the same bits as i start with can u help me?>
thanks alot
clear all
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
  댓글 수: 6
itsik
itsik 2011년 6월 6일
fist of all i want to thank you for your help
supposed thats i use ifft function :
ifft(phase_sym,1024) ( sampling of 1024)
and then i use the fft function , im getting a matrix of
1x1024
so my question is, how i can get the original matrix
(1X10 of phase_sym) back
thank you all
itsik
itsik 2011년 6월 8일
anyone , please ?

댓글을 달려면 로그인하십시오.

채택된 답변

Yella
Yella 2011년 6월 14일
Heyy
Check this code
x=[1 2 3 4 5 6]; y=fft(x,512) z=ifft(y)
and u observe that x=z(1:1:length(x))
the first elements of the ifft is the signal the other elemnts in the matrix are made zero..

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Transforms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by