Need help with Task 4 of MATLAB. Do not hardcode.
Task 10: Using your main script based on the user's choice from Task 1, accomplish the following: if the user chose to convert resistance to color band, prompt the user to enter resistance [ohms] as a vector with each digit being a separate value in the vector. First, check that all digits entered after the first two digits are zeros. If they are not, produce an error message that terminates the program. Then, using Resht2Color, convert the resistance entered by the user to its corresponding color band and output the colors to the command window.
For a single input statement, first check that there are only three colors entered. If not, produce an error message that terminates the program. Next, using ColorResistor, convert the color band entered by the user to its corresponding resistance [ohms] and output this to the command window.
Sample Output:
Sample output: Additional test scenarios are described in the Additional Resource folder accompanying this prompt. Menu Sample: Resistance to Color Band. The first case shown.