Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab code for OFDM modulation...little help

Status
Not open for further replies.

salonikios

Newbie level 2
Joined
Apr 15, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
Hello to everyone, i need help to finish the last two comments in my matlab code.Thanks in advance for your time and assistance guys!!!

clc;
N = 1024; %FFT points
M = 2; %QPSK efficiency
CP = 1/16; %CP length
PCKS = 1; %Number of packets
for pak = 1:pCKS
Bit_Block = randint(1,N*M);
X = 1/(sqrt(2)) * ((2*Bit_Block(1:N)-1) + j*(2*Bit_Block(N+1:N*M)-1));
x = sqrt(N) * ifft(X,N);
x_cp = [ x( (1-CP)*N+1:end), x]
max_energy_symbol=max(abs(x).^2); % find maximum energy symbol abs(x)^2
max_by_mean=max(x)/mean(x); % divide max by mean
magnitude=abs(x); % convert to dB
powerdB=20*log10(magnitude+eps);
% store for many experiments
% plot cdf curve : dfittool
end
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top