Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need Help In Matlab. Please. Your company has invented a new device that can convert either sunlight or heat into electricity very efficiently. However, it

Need Help In Matlab.

Please.image text in transcribedimage text in transcribed

Your company has invented a new device that can convert either sunlight or heat into electricity very efficiently. However, it can only use one source of energy at any given time, although the mode in which it operates (heat or light) can easily be changed by a voltage applied to a control terminal. In order to design an automated controller so that the device always uses the source that will provide the most energy at any given time, a graph is plotted showing the combinations of illumination and temperature for which heat conversion yields the most energy light conversion yields the most energy . neither heat nor light are sufficient to maintain the control circuits without a net loss of energy Write a program to ask the user for temperature (T) in units of Fahrenheit [F] and illumination (E) in units of lux [lx] The program should check to ensure the temperature is between 260 and 31O kelvins [K], and the illumination values are between 0 and 100,000 lux [Ix]. If the user enters a value outside of these ranges, the program should terminate, telling the user the value was entered outside the correct range. The error statement must use the variable name in the Command Window output to tell the user which entry value (temperature, illumination, or both) was invalid and caused the program to terminate. The program will contain a cell array named status containing the following words as a text strings: HEAT LIGHT OFF The program will correctly categorize the temperature and illumination entered by the user as one of the categories contained in Status. The program should produce a formatted output statement to the Command Window, similar to the following, for the temperature value chosen Temperature of TF degrees Fahrenheit - TK kelvin For TK kelvin and E lux, the device is in mode Status In this statement, TF, TR, E and status are replaced by the actual values. Format the values of temperature and illumination as integer values. The program should also produce the graph as shown here with all phase division lines, phase names, and should indicate the point entered by the user with a symbol of your choice 100000 80000 LIGHT MODE 60000 E 40000 HEAT MODE 20000 SYSTEM OFF 260 270 280 290 300 310 Temperature (T) [K] Run and Save Run the program using the following test case. Temperature-80 degrees Fahrenheit [ Illumination 20,000 lux [lx] Save the figure generated from this test case as HW9B_username.PNG, where username is your email username (such as IMATIGER2, from your Clemson email address: imatiger2@clemson.edu). For more information about saving figures, see the Save a Figure handout on Canvas. Submission Notes Name your .m file HW9B USERNAME.m. Be sure to include all required "non-code" elements are in your file (header, variable list, comments, etc.) Your company has invented a new device that can convert either sunlight or heat into electricity very efficiently. However, it can only use one source of energy at any given time, although the mode in which it operates (heat or light) can easily be changed by a voltage applied to a control terminal. In order to design an automated controller so that the device always uses the source that will provide the most energy at any given time, a graph is plotted showing the combinations of illumination and temperature for which heat conversion yields the most energy light conversion yields the most energy . neither heat nor light are sufficient to maintain the control circuits without a net loss of energy Write a program to ask the user for temperature (T) in units of Fahrenheit [F] and illumination (E) in units of lux [lx] The program should check to ensure the temperature is between 260 and 31O kelvins [K], and the illumination values are between 0 and 100,000 lux [Ix]. If the user enters a value outside of these ranges, the program should terminate, telling the user the value was entered outside the correct range. The error statement must use the variable name in the Command Window output to tell the user which entry value (temperature, illumination, or both) was invalid and caused the program to terminate. The program will contain a cell array named status containing the following words as a text strings: HEAT LIGHT OFF The program will correctly categorize the temperature and illumination entered by the user as one of the categories contained in Status. The program should produce a formatted output statement to the Command Window, similar to the following, for the temperature value chosen Temperature of TF degrees Fahrenheit - TK kelvin For TK kelvin and E lux, the device is in mode Status In this statement, TF, TR, E and status are replaced by the actual values. Format the values of temperature and illumination as integer values. The program should also produce the graph as shown here with all phase division lines, phase names, and should indicate the point entered by the user with a symbol of your choice 100000 80000 LIGHT MODE 60000 E 40000 HEAT MODE 20000 SYSTEM OFF 260 270 280 290 300 310 Temperature (T) [K] Run and Save Run the program using the following test case. Temperature-80 degrees Fahrenheit [ Illumination 20,000 lux [lx] Save the figure generated from this test case as HW9B_username.PNG, where username is your email username (such as IMATIGER2, from your Clemson email address: imatiger2@clemson.edu). For more information about saving figures, see the Save a Figure handout on Canvas. Submission Notes Name your .m file HW9B USERNAME.m. Be sure to include all required "non-code" elements are in your file (header, variable list, comments, etc.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions