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 visualizzazione (ultimi 30 giorni)
%%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];

Risposte (1)

Walter Roberson
Walter Roberson il 6 Apr 2016

Community Treasure Hunt

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

Start Hunting!

Translated by