I am confused if the way the code converting serial to parallel is correct or not. The comments says" convert serial to parallel" but the code below the comment does the opposite. Please advise. if you need the whole code, i can email it to you.

조회 수: 1 (최근 30일)
%%define the modems Tx/Rx
switch typ
case 1
Tx=modem.qammod('M',M);
Rx=modem.qamdemod ('M',M);
case 2
Tx=modem.pskmod('M',M);
Rx=modem.pskdemod ('M',M);
otherwise
error('Error, Constellation Family not Defined');
end
%%data generation
D=randi ([0 M-1],m,N);
D_Mod=modulate(Tx,D);
%%serial to parallel
D_Mod_serial=D_Mod.';
%%specify Pilot & Data Locations
PLoc = 1:pilotFrequency:N; % location of pilots
DLoc = setxor(1:N,PLoc); % location of data
%%Pilot Insertion
D_Mod_serial(PLoc,:)=E*D_Mod_serial(PLoc,:);
figure;
imagesc(abs(D_Mod_serial ))
%%inverse discret Fourier transform (IFFT)
% Amplitude Modulation
d_ifft=ifft(D_Mod_serial);
%%parallel to serial
d_ifft_parallel=d_ifft.';
%%Adding Cyclic Prefix
CP_part=d_ifft_parallel(:,end-Ncp+1:end); % this is the Cyclic Prefix part to be appended.
ofdm_cp=[CP_part d_ifft_parallel];

답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 6일

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by