I am working on a program for class and we need to read in a 4-bit input (e.x. 1101) from a user and treat is as a 4-bit digital data. We then need to plot this input data and use it later to calculate the Cyclic Code base on a generator polynomial we are given.
However, after looking into MATLAB input, I'm not sure how to read in the users input as a "binary input", what would be the best way to accomplish this?
Thank you!
Here is the exact part of the instructions I am having trouble with:
Ask the user for a 4-bit input digital data and plot the user given digital data
We then use that input to do the following, which I think I should be able to do once I figure out how to get the user input!
Using the polynomial P(X) = 1 + X + X3, generate the valid codeword and transmit the codeword