function [energy_kWh_month] = energy_calculation(user_answers) //This function takes the user's answers and calculates the monthly //energy consumption in kWh per month. //Energy - Lights light_Wh_month = 1/80*6690/240*280*8*30; //1 watt per 80 lumens * 6690 lumens per 240 ft^2 * 280 ft^2 * //8 hours per day * 30 days per month //Energy - Laptop(s) laptop_Wh_month = 70*3*1*30*user_answers(5) //70 watts * 3 hours to charge * 1 charge per day * 30 days per month * //num laptops //Energy - Cell Phones (Smart Phones) phone_Wh_month = 17.5*3*1*30*user_answers(4); //17.5 watts * 3 hours to charge * 1 charge per day * 30 days per month * //num cell phones //Energy - Microwave microwave_Wh_month = 1000*0.5*30*user_answers(8); //1000 watts * 0.5 hours per day * 30 days per month * num microwaves //Energy - Refrigerator refrig_Wh_month = 160*24*0.85*30; //160 watts * 24 hours per day * 85% of day running * 30 days per month //Energy - Washing Machine wash_mach_Wh_month = 1200*0.5*user_answers(10)*52/12; //1200 watts * 0.5 hours per load * loads per week * weeks per month //Energy for HVAC Mini-Split minisplit_Wh_month = 800*12*30; //800 watts * 12 hours per day * 30 days per month //Energy - Exhaust Fans exhaust_fan_Wh_month = 12*12*30; //12 watts * 12 hours per day * 30 days per month //Energy - Miscellaneous misc_Wh_month = 500*30; //500 Wh per day * 30 days per month for misc small appliances energy_kWh_month = (light_Wh_month + ... laptop_Wh_month + ... phone_Wh_month + ... microwave_Wh_month + ... refrig_Wh_month + ... wash_mach_Wh_month + ... minisplit_Wh_month + ... exhaust_fan_Wh_month + ... misc_Wh_month)/1000; // watt hours * 1 kWh / 1000 Wh endfunction