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 CDMA

Status
Not open for further replies.

Aya2002

Advanced Member level 4
Joined
Dec 12, 2006
Messages
1,140
Helped
184
Reputation
376
Reaction score
117
Trophy points
1,343
Location
Iraq
Activity points
8,006
I saw, nobody wants to contribute to this group, so that i decided to start it myself,

the following is a matlab code for DS - CDMA. I am waiting for any comments of this group members.

%% Reduced PAPR in CDMA using new Technique.
%% DS-CDMA Simulation by Montadar Abas

clear all;
close all;
clc;

%% Deciding the Number of users and the Number of bits for each user (same
%% for all users)
x= input ('Number of users =');
y=input('Number of Bits for each user = ');
r=log(x)/log(2)
%% Generating the Walsh Code
xx=hadamard(x);
wmmsnn=xx:),:);

u=[];
m=[];
for t = 1 : x

u=[u; (randint(1,y,2)*2-1)];
m=[m ; (kron(u(t,:),wmmsnn(t,:)))];
end
%% combining all the messages together and normalize it.
mms=sum(m)/x;
y2 =rectpulse(mms,r);
%% Pass through AWGN channel
snrloop=-5:1:35;
numsnr=length(snrloop);
bervec=[];
for n=1:numsnr

mmsn2=awgn(y2,snrloop(n),'measured');
%% Integrate and dump (downsampling)

mmsn=intdump(mmsn2,r);
%mmsn=dp_nrz_L(mmsn7);
%% Decode the recieved noisy signal to reproduce the original messages.

g=ones(1,y);
outmsg=[];
for rb=1:x
g1=kron(g,wmmsnn(rb,:));
r1= g1.*mmsn;
rr1=reshape(r1,x,length(r1)/x);
k1=sum(rr1);
u11=k1>0;
outmsg=[outmsg;u11];
end
 

thank you for the code but i want to ask you if you are working on IDMA ??if yes i need your advice please.
 

in fact i am working on MC - CDMA
 

well maybe we can be friends i am working on mc-ds-cdma but thinking if idma gives better performance or not?? what do you think Aya??
 

sorry for the late response,

the interleaved division multiple access may has better performance, but with respect to what?
 

i want to ask about this program: where is the modulation??
i want to know also if there is any problem if i put the modulation before generating the coding with PN generator??
thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top