Homework 3: PRN sequence


Don't start this homework until after lecture on September 16.

Due: in lab, September 19, 2003

Using the notes from class, write a function that computes the PRN sequence for 1 +x3 + x10. This requires that you add the output of the 3rd and 10th registers - the additional 1 in the expression 1 + x3 + x10 has no meaning in this class! Run your code so that you have created 1023 outputs. In your main code, save your PRN sequence into a Matlab file called your_lastname.

The PRN output must be saved in the variable name PRN.

E-mail me your Matlab file (*.mat) as an attachment.

Your PRN function software should be turned in as hard copy - I don't need to see your main code.

Steps to take:

  1. make a variable with 10 indices. Set them to 1's.
  2. check the value of the 3rd and 10th registers. Use "Boolean algebra" to determine the new value for register 1.
  3. Shift registers 1-9 to registers 2-10, introduce new value for register 1, and send register 10 to the output.
  4. When you are all done (i.e. you've done it 1023 times), change all the 0 output values to 1 and the 1 output values to -1.
  5. Save PRN values.