Question: Write a MATLAB program to create a SINGLE MATRIX of characters as shown below. The generated matrix MUST include a single space character for columns

 Write a MATLAB program to create a SINGLE MATRIX of characters

Write a MATLAB program to create a SINGLE MATRIX of characters as shown below. The generated matrix MUST include a single space character for columns 2 and 6 1 ABC DEF 2 ABC DEF 3 ABC DEF 4 ABC DEF 5 ABC DEF 6 ABC DEF 7 ABC DEF Your program MUST perform the FOLLOWING TASKS 1. Generate the SINGLE MATRIX with exactly the same format as shown above 2. Prompt the user to input an integer number (num) within the range 1nums15 3. Your program MUST verify if the inputted number num is an integer and within the specified range. If not, your program MUST display a message on the screen stating that the number entered was incorrect and allow the user to re-enter the number without the need to rerun the program 4. You MUST use the random number generation function(s) from Matlab, to generate automatically num random and distinct element positions in the matrix and substitute each of them by the letter X' only for the columns corresponding to the characters ?', 'B', 'C', 'D', ?', or . Your program MUST display the modified matrix on the screen. Your program MUST also check and eliminate duplicated random selections. The examples below show the original matrix and the modified matrix when num-5 and num-10 were inputted. Original Matrix 1 ABC DEF 2 ABC DEF 3 ABC DEF 4 ABC DEF 5 ABC DEF 6 ABC DEF 7 ABC DEF Modified Matrix: num-5 1 ABC DEX 2 ABC DEF 3 ABC DEF 4 XXC DEF 5 ABC DEF 6 ABC DXF 7 ABC XEF Modified Matrix: num=10 AXC DXF 2 XBC DXF 3 ABC DEF 4 ABC DEF 6 ABC XEX 7 ABC XEF 5. Your program MUST allow the user to repeat the procedure without the need to rerun the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!