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.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
%%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];
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu OFDM finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!