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.

help in code needed(matlab)

Status
Not open for further replies.

mujee

Member level 1
Joined
Feb 11, 2007
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,585
hi guys
i have been trying to get plots of rectangular pulse and then a raised cosine pulse by first generating a rectangular pulse and then filtering it through firrcos filter but i m not getting the results

can anyone help me with code.....

x=round(rand(1,16000));
xk=(-1).^x; % BPSK symbols

xup=upsample(xk,100);
a=sqrt(100)*firrcos(255,0.01,1,2,'rolloff','sqrt');
x_Tx=filter(a,1,xup);

i have used this code because this was given to us in our first assignment.

there are few confusions in it too...first what would the ouptut of filter function be....i have checked matlab help but it doesnt say anything what does the function 'filter' outputs...i was trying to plot the output of filter function (because if it shapes the rectangular pulse then its output should be the reshaped rectangular pulse) but it didnt produce that raised cosine wave. which clearly shows there is something more going on which i really dont know
so can anyone help?

i need to do it for bpsk and qpsk both

please help
 

no reply :cry:

c'mon guys ...please help its urgent
 

me too waiting to see the solution of this problem as i myself dont know how could this be solved
lets hope someone comes up with a solution
 

Dears,

Let me explain it for you both.

In this simulation you have generated a binary signal at first then you have upsampled the data by 100, and then tried to change the ideal pulses to cosine ones.

The main problem is that you up sampling rate is not enough!!!

Since your cosine shaped pulse length is 255 you have to upsample your data atr least to 255.
If not, the pulses will overlap in time and you will not get the right result.

Hope this answer helped you.

Yours.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top