Question: This is a MatLAB question. Will give thumbs up for correct answer. Problem 4: I/O statements In Engineering Foundations, you have been introduced the color
Problem 4: I/O statements In Engineering Foundations, you have been introduced the color code for resistors used to determine to resistor's nominal value The color code is summarized in the table: Coler Value Black 0 Brown Red 2 Orange 3 Yellow 4 Green 5 Blue 6 Violet 7 Gray 8 White 9 The nominal value for the resistor is determined by reading the three color bands and using the formula: Nominal Value (Colorl_Value 10+ Color2_Value) 1ae olor3 Value The 4th band indicates the tolerance and can be used to determine the expected range for the actual resistor value. The table below shows the tolerance color code: 4 Band Color Tolerance 5% Gold % None The actual value of the resistor should be in the range: Nominal Value* (-Tolerance)to Nominal Value (1 + Tolerance with the tolerance in decimal rather than %. Write a script that will do the following: 1. Prompt the user for the colors for the 4 color bands using a series of menu statements. 2. Compute the nominal value of the resistor using the user input for the first three color bands. Remember to take into consideration that your color values from your menu statements will range from 1 to 10 but the actual color values range from 0 to 9. You should be able to do some incredibly simple math to fix this. 3. Create a 1-d vector (array) with the three tolerance values in decimal (not percent)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
