0

I have a variable which has values of PRBS 4 sequence.

Output = [0 0 0 1 0 0 1 1 0 1 0 1 1 1 1];

I want to plot this in Matlab. I know I have to use idinput() function to generate prbs sequences. But I am using an old version of Matlab and this function is not available for me. Just by using plot(Output) will not give me the PRBS signal, since in the transition from 0 to 1 and 1 to 0, it will be like a triangle. I need to have a square waveform for PRBS.

Also, I want to make this signal 1 Gbps signal. Is this possible to do?

Best Regards, nkp.

nkp
  • 13
  • 6
  • 1
    I'm not sure of what you want to obtain, but have you tried `stairs(Output)` ? – Jommy Aug 14 '14 at 08:22
  • @Jommy : I have used it. Actually, I want to take magnitude spectrum of a 32 Gbps PRBS4 signal. The above signal, I want to generate, would be the time domain signal. Then I can take fft of it and plot the abs of fft to get the magnitude spectrum. The problem is with stairs, I will get the waveform with 15 bits. But, I dont know how to make this signal a 32Gbps signal. Please tell me if you know to do it. – nkp Aug 15 '14 at 12:04

1 Answers1

0

You can repeat each of output bit by some number and then plot.

For example: output = [0 0 1 0];

Then you repeat each bit by some number (let say 4), so the output vector is

[0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0].

Andrey Korneyev
  • 26,353
  • 15
  • 70
  • 71