File Exchange

image thumbnail

greedy algorithm in OFDM resource allocation (single user)

version 1.0 (3.82 KB) by

the implemention of greedy algorithm in mex file



View License

As the power needed to transmit a certain number of bits in
a subcarrier is independent of the numbers of bits allocated to
other subcarriers, it turns out that a greedy approach is optimal.
A greedy algorithm assigns bits to the subcarriers one bit at a
time, and in each assignment, the subcarrier that requires the
least additional power is selected. The bit allocation process
will be completed when all required data rate is satisfied.

Comments and Ratings (12)


bito (view profile)

Useful! thx


Syed (view profile)

Thanks Hamid for this


Sir can you give me code multiuser greedy algorithm. I already used you code singleuser but I want modified to multiuser greedy algorithm. I need help from you.

Nur Indah


asma b

asma b (view profile)

sir can you give me code for subcarrier allocation

Hamid Ramezani

Hamid Ramezani (view profile)

For those who are working with MATLAB on a 64 bit operating system, please build a 64 mex function for the c code inside the zip folder.

The instruction is as follow:

1. mex -setup (choose the appropriate compiler)
2. mex greedyAlgSingleUser.c (building mex function)

Hamid Ramezani.

Varuna De Silva

Thanks Hamid, this code is very helpful as a starting point.

However, I have a doubt in your calculation of individual channel SNR's after SC allocation.

In the program channel SNR = Pt / CSI^2, for fourth image.

however, shouldn't it be SNR = Pt*CSI^2/ variance of AWGN ?

Thank you .The result is good.

subbu ks

how to run thus file.showing error in greedyAlgSingleUser...can u please suggest me at earliest

yang lin

how to use it?



remove mex file


license will be added

MATLAB Release
MATLAB 7.4 (R2007a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video