UNIVERSITY OF UTAHELECTRICAL AND COMPUTER ENGINEERING DEPARTMENTECE1020 COMPUTING ASSIGNMENT 7N. E. COTTER MATLAB® CONTROL FLOW: FILTERINGREADINGMatlab® Student Version: learning Matlab 6, Ch 6-2 to 6-6Mastering Matlab® 6, Ch 10TOPICSControl flow: For, while, if, switchOVERVIEWIn previous assignments, we have considered all of the parts from which we couldconstruct a communication link between a base transmitter and a receiver:• translating commands from a control language, (expressed in strings such as ‘right’ ‘1’),into a sequence of binary numbers,• creating a codebook for translating binary information into longer binary strings(allowing us to perform error correction later on),• transmitting sinusoids of two different frequencies representing 0’s and 1’s in thecodewords,• using the radiation pattern for an antenna to determine the power of the signal at thereceiver (as a function of distance and direction),• using correlation and summation (i.e., a matched filter) to determine whether eachreceived bit signal (plus noise) represents a 0 or 1,• calculating the distance between the received binary bits and each codeword to find thebest match,• translating the index of the codeword into its corresponding bit pattern (i.e., the binaryinformation we had at the very beginning of this process), and• interpreting the bit pattern as a command to be carried out (such “right 2”).We are now ready to simulate an entire system (with some simplification) in a fashionthat allows us to process an arbitrarily long sequence of input commands.PROCEDUREIn this assignment, you will use for, while, if, and switch statements to write a completecommunication system simulator.+5 pts Script File for calculationsUsing a text editor program on your PC, create a script file called control_flow.mcontaining matlab commands to perform the calculations in this assignment.+5 pts Do not use semicolons at the ends of commands in your script files.+5 pts Create a string variable (having eight rows) called command_str containing thecommands ‘right’, ‘0’, ‘right’, ‘1’, ‘left’, ‘1’, ‘right’, and ‘0’.+5 pts Use a for loop to interpret the command strings:• processing the strings (i.e., ‘right’, ‘left’, ‘0’, or ‘1’) in order, and (continued in next item)+10 pts• translating the strings (using a switch statement) into numbers (as opposed to binarycodes used earlier):• 0 = 0• 1 = 1• left = 2• right = 3+5 pts• Concatenate the eight command numbers to create one horizontal array (of 8 numbers)called command_num. Then end the loop.+10 pts Create a 4×6 array called codewords that consists of four 6-bit codewords. Youmay create the codewords in any way you desire, including code you wrote for earlierassignments.+10 pts Use a for loop to translate the numbers from command_num into thecorresponding codewords. In other words, if the number is 0, use the first codeword; ifthe number is 1, use the second codeword, and etc. (Remember that Matlab indexing isone-based.) Concatenate the codewords to create a binary array (with only one row)called command_code (containing 48 bits for the 8 codewords for the 8 commandnumbers for the original 8 commands). These are the encoded bits to be transmitted tothe rover.+5 pts Rather than translating the bits in command_code into cosine waveforms andusing the antenna radiation calculations from earlier assignments, we will simply createan array indicating which bits are received incorrectly. Using the randn function and alogical operator, create an array called “noise” consisting of 48 zero and one values. Thevalue should be zero when the entry in the array returned by randn is less than 1.5. The1’s in “noise” will correspond the erroneous bits in the received code words.+5 pts To flip the erroneous bits to the wrong value, compute the exclusive-or of thecommand_code and noise arrays and place the result in an array called command_recv.(On average the noise will change only a few bits.)+5 pts In conjunction with the following steps, use an outer “for” loop to process thecommand_recv array one codeword at a time until the end of the array is reached. Thegoal is to decode the incoming commands.+5 pts The first operation you will perform in the loop is to extract the next receivedcodeword from command_recv and place it in an array called codeword_recv. In otherwords, extract 6 bits from the front end of command_recv and place them incodeword_recv. Don’t forget to remove these six bits from command_recv for the nexttime through the for loop, but check to see if the array is already empty first so you don’tgenerate an error.+10 pts Using Hamming distance, (the number of bits that are not equal for two binarynumbers), determine which codeword is closest to codeword_recv. Append thecorresponding command number, (e.g., 2 if the codeword corresponds to the command’left’), to an array called command_dec. When the loop is finished, command_dec willcontain our sequence of decoded commands.+10 pts Using a “switch” command, translate the command number in command_decinto the corresponding command string, (e.g., ‘left’), and add that string as another row toa string array called command_str_recv. If we are lucky, command_str_recv will be thesame as the command_str that we started. (With the level of noise we are using,however, you will get one error approximately half the time.) Where we have decodingerrors, our rover will turn the wrong direction or go the wrong distance.+5 pts Run Script FileRun your script file by typing the name of the file without the .m>> control_flowUse a diary file to capture the output of control_flow.If you make any changes in your control_flow.m file, be sure to run the followingMatlab command to insure that Matlab reads your file again the next time you run it:>>if you can help me with the code for the following assignment

Haven’t Found The Relevant Content? Hire a Subject Expert to Help You With
Post Your Own Question And Get A Custom Answer
Hire Writer

Why Hire a Professional Essay Writer from MyHomeworkGeeks

Quality Urgent Essays

Domyhomeworkk online platform provides the best essay writing service ever received elsewhere, thanks to our professional essay writers. Experience gained in the 10+ years of being in the assignment writing industry is also an added advantage.

Professional and Experienced Academic Writers

A lot is done to maintain us as the best essay writing service provider. Besides owning a degree from a recognized university, a writer must pass the rigorous tests we take them through before they are considered eligible to offer urgent essay help on our website.

Affordable Urgent Assignment Help

Who said a reliable website should not be cheap also? While it is human nature to associate prices with quality, that does not always work. At, we guarantee you cheap and urgent essay help without compromising the quality.

24/7 Available Urgent Essay Writing Service

Whether it is a ‘write my essay for me cheap’ or ‘edit my essay’ order you want to request, always feel free to reach us at any time of the day. Our experts work in shifts to ensure that you access urgent essay writing services at any time of the day.

Plagiarism Free Essays Online

The punitive measures that come with plagiarized content are so harsh, and we understand that. We consequently ensure to write each client’s papers from scratch no matter how urgent the essay is. To acknowledge borrowed content, our quick writer references and cites the work.

Wow Customer Support 24/7

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

So much stress and so little time? Take care of yourself: let us help you with your tasks. We offer all kinds of writing services.


Custom Essay Writing Services

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.


Admission and Business Papers

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.


Editing and Proofreading

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.


Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Have a homework question? Get help from verified tutors now!