Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Could somebody help me with the coding for part 2 of this question on MATLAB? Part 2 of the problem starts when it says Braille
Could somebody help me with the coding for part 2 of this question on MATLAB? Part 2 of the problem starts when it says "Braille conversion to ASCII" Also can you also do a code for testing the case? Thank you
raille English Braille is a writing system that uses binary encoding. In English Braille, each letter of the alphabet and each number are represented by a cell that contains raised dots at one or more of six locations, arranged as an array with 3 rows and 2 columns. Table 1 shows the English Braille representation of the 10 digits of the decimal system. We will represent a Braille cell in MATLAB as a 3 X 2 array where raised dots are represented by ones, and zeros are used elsewhere. We will represent a sequence of n Braille cells in MATLAB as a 3 X 2n array where individual cells have been concatenated horizontally. For example, the integer 2 is represented as the 3 X 2 array: [1, 0; 1, 0; 0, 0] and 24 is represented as the 3 X 4 array: [1, 0, 1, 1; 1, 0, 0, 1; 0, 0, 0, 0). Note that in English Braille, numbers are preceded by a "numeral sign" character, which we omit in this activity Table 1: English Braille representation (the black dots indicate the raised dots) of the ten digits of the decimal system. Images are from: https://en.wikipedia.org/wiki/English Braille In this problem, you will write two MATLAB functions that convert numbers from their Braille representations into other representations. Braille conversion to double Write a function with the following header: function[result myBraille2Double(braille) where braille is a 3 X 2n array which represents an integer as a sequence of Braille cells as described above, and the result is the number (MATLAB class \double"] represented by braille. Test case: result myBraille2Double (1,0,1,1:1,0,0,1:0,0,0,01) result 24 result-myBraille2Double (1,0,1,1,1,0;1,0,0,1,0,0;0,0,0,0,0,0]) result 241 result myBraille2Double (1,0,0,1,1,0;0,1,1,0,1,1;0,0,0,0,0,0]) result 598 Braille conversion to ASCII code Write a function with the following header: function [ASCII myBraille2ASCI raiJLe) where braille is a 3 X 2n array that represents an integer as a sequence of Braille cells as described above, and ASCIl is a 1 X n row vector, where each element is the ASCII code (MATLAB class "double"] of the corresponding cell in braille. Table 2 shows the ASCII codes of the ten digits of the decimal system. Table 2: A section of the ASCIl table Character In MATLAB, you can obtain the ASCII code of a character by usine the following (for example with the char '5') dauhle5' or '50. You can also check what character is generated by an ASCII code by using ehax53) which will in this case return 5. See http://www.asciitable.com/ for more information on ASCII Submit both functions and examples of test data in published .pdf filesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started