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

Extra Credit: Execute the same flowchart in Microsoft Excel. Label your file to

ID: 2990613 • Letter: E

Question

Extra Credit: Execute the same flowchart in Microsoft Excel. Label your file to identify yourself and the program. For this extra credit portion, you will submit one Excel worksheet named HW16.xlsx. Your worksheet must contain the following information: Cell A1: Your first and last name Cell A2: The course and your section Cell A3: The date Cell A4: The homework assignment number and question number You will upload the Excel tile to Blackboard. Printed or late submissions wiIl not be accepted. PART B A thermostat tries to keep an even room temperature within a certain range. but not a constant one. It would have to keep switching on and off with constant cycling to maintain a constant temperature. You arc responsible for programming a digital thermostat using MATLAB to turn the furnace on at one degree below the set temperature and turn it off at one degree above the set temperature. You have the following variable inputs available to you to read: Set Temperature ActualTemperature ActualTemperature is the variable that stores the temperature that is measured by the thermostat. For our purpose, we assume that we play the role of the thermostat and specify what the actual temperature is using the appropriate input command 5etTemperature will have a fixed value of 72 degrees. Your output is the variable OnOff. An output of I turns the furnace on and a 0 turns the furnace off Draw a flowchart for this program and submit your flowchart together with your answers from PART D on I3lackboard in a PDF file or bring to class on 6 Nov. Write a MATLAB script tile that executes your flowchart. It should turn output variable OnOff to 1 or 0 at the appropriate room temperatures above and below 72 degrees, and not change it when the value is between 71 and 73 degrees

Explanation / Answer

function [y]=my_thermostat(set_temp)
current_temp=input('enter the current temperature ');
if current_temp>=73
disp('the furnace will be turned off')
y=0;
else if current_temp<=71
disp('furnace will be turned on')
y=1;
else
disp('no action required ')
end
end
end