Introduction
Figure 1. Parallel and Serial Data Transmission
It seems that nearly every consumer device now contains some sort of WIFI interface. With the increased data transmissions, encoding and decoding schemes have been developed for computational devices to handle the information and deal with noise that may corrupt the data. In this lab, we will gain some practice using loops to encode and decode a binary data transmission, with possible errors created by noise.
Procedure
As usual, create a script, include a comment at the top explaining the purpose of the script, your name, and the date it was created.
1. Using the ASCII code table (Links to an external site.), write the decimal representation of your first name in the regular, left to right ordering. For example, my name, Misha, has ASCII encoding:
‘M’ = 77
‘i’ = 105
‘s’ = 115
‘h’ = 104
‘a’ = 97
Ordered left to right, an array containing the ASCII encoding of my name would be:
name = [77,105,115,104,97]
2. Write a for loop that calls your dec2bin() function from above to convert all the letters in your name array to binary.
3. Now your binary name array is ready to be transmitted, but during transmission, noisy interference due to a solar flare has altered the integrity of the data! Download noise.m and pass your binary name array as an input to the noise function. Save the output in an array, to later be decoded.
{{{ check the attached pictuer }}}
4. Next, write a for loop that converts each element of your noisy binary name array to decimal. You may use the built-in function bin2dec(), but keep in mind that this function expects the binary number to be a string, so you’ll have to convert the binary number to a string first using num2str().
5. Was your transmission affected by the solar flare or not?
Turn-in Instructions
You will need to submit .m files for each function you define. Each .m file should include your name and function description in comments. Upload your files via Canvas. Let me know if you have any questions!
RubricCriteriaRatingsPtsThis criterion is linked to a Learning OutcomeFunctionality
10 ptsExcellent
The code runs as expected, with maybe 1 minor mistake
8 ptsGood
The code runs well in general, but there are several minor mistakes or maybe 1 major mistake
5 ptsSolid Attempt
The code runs, but there are MANY major mistakes and/or minor mistakes.
0 ptsChaos
The code does not run and/or does not approach the intended functionality of the lab
10 pts
This criterion is linked to a Learning OutcomeCode Comments
5 ptsExcellent
The code is properly commented so another engineer may review the code, understand its’ functionality, and use the code.
4 ptsGood
Most of the code is properly commented so another engineer may review the code, understand its’ functionality, and use the code
2.5 ptsSolid Attempt
More than half the code is commented, but comments are not clear and/or do not reflect functionality.
0 ptsChaos
Less than half the code is commented
5 pts
This criterion is linked to a Learning OutcomeCode structure
5 ptsExcellent
The code structure uses the recently covered materials in the reading and classroom to efficiently provide functionality
4 ptsGood
The code structure MOSTLY uses the recently covered materials in the reading and classroom to efficiently provide functionality
2.5 ptsSolid Attempt
The code structure works by any means to provide functionality
0 ptsChaos
There is no functionality and therefore no code structure
5 pts
Total Points: 20