Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The above table represents a color decoding scheme for pixel data. The various c

ID: 3836798 • Letter: T

Question

The above table represents a color decoding scheme for pixel data. The various colors in column 3 are represented by color ID tags listed in column 1 (8-15). Write a MATLAB function with header function[ID, COLOR] = pixel data(A) that will convert an array of pixel codes and produce an output with corresponding color and IDs. Consider the following test case: A = [1000, 1111, 1100, 1001, 1001] represents the pixel codes for a small segment, your function should convert this information to: ID = (8, 15, 12, 9, 9) COLOR = Black White Red Blue Develop a pseudo code to solve the above problem. Write the appropriate MATLAB statements for each step. Test your solution by writing a MATLAB function on your computer and submit a print copy/email attachment of your code.

Explanation / Answer

Pseudo Code :

1) Create three arrays as : int ID[8] ; int Code[8] ; String color[8] ..............since there are 8 entries in table.

  int ID_ans[] ; String color_ans[] ...............to store the result vectors.

2) Let Array A be an array that has Code vector of color combinations.

3) for int i=0 to A.length()

ID_ans[i] = ID[i];

Color_ans[i] = Color[i];

4) display ID_ans[] and Color_ans[] .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote