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

PROBLEM3 Total: 40 Points) For the safety of the workers and the protection of t

ID: 3725745 • Letter: P

Question

PROBLEM3 Total: 40 Points) For the safety of the workers and the protection of the equipment in a water treatment facili want to develop a computer program that can determine whether operations are within safe limits or whether a potential shutdown is necessary to prevent catastrophic level gauge, a pressure gauge and a thermometer installed to monitor the key operating conditions. ty, you failures. The facility has a water Write a MATLAB script incorporating IF-ELSE statements or IF-ELSEIF-ELSE statements that asks the user to enter the water level as measured by the fluid level gauge (in feet), the measured pressure in psi (pounds per square inch), and the temperature measured in degrees Fahrenheit. MATLAB must then use the entered inputs to determine whether any safety limits are violated. If a safety limit is violated, then MATLAB must display a specific message (see below) warning the user that a shutdown is necessary. Shutdown is recommended if any of the following combinations of conditions is satisfied: Fluid level exceeds 30 feet regardless of pressure and temperature (display message: "Fluid level is too high") Pressure exceeds 175 psi regardless of fluid level and temperature (display message: "Pressure exceeding safe limits") Temperature exceeds 200 degrees Fahrenheit regardless of fluid level and pressure (display message: "Temperature exceeding safe limits") Fluid level exceeds 10 feet, pressure exceeds 100 psi, and temperature exceeds 130 degrees Fahrenheit (display message: "Tri-combo limit exceeded") Fluid level exceeds 20 feet and pressure exceeds 12 0 psi (display message: "Overflow risk") Pressure exceeds 125 psi and temperature exceeds 150 degrees Fahrenheit (display message: "Pipe rupture risk") . For all other cases, the facility is operating within safe limits and the computer should display the message "Operating within safe limits". Copyright © Texas Tech University Page 3 of 3

Explanation / Answer

AS per your requirement the below one is solution please follow it

MATLAB CODE

clc;

clear all;

%inputting values

fluidLevel=input('Enter water level measured by the fluid level gauge(feet): ');

press=input('Enter pressures(pounds/inch^2): ');

temp=input('Enter Tempearature: ');

disp(' ');

if fluidLevel>30 %checking condition 1

disp('Fluid level is too high!');

  

  

elseif press>175 %checking condition 2

%nested if

if fluidLevel>30 && press>350 %checking condition 7, if satisfies then print this

disp('Burn risk!'); %here condition 7 is put bcoz pressure>350 is greater then 175

%hence should come under this if

else

disp('Pressure exceeding safe limits!'); %else print this

end

  

  

elseif temp>200 %checking condition 3

disp('Temperature exceeding safe limits!');

  

elseif fluidLevel>10 && press>100 && temp>130 %checking condition 4

disp('Tri-combo limit exceeded!');

  

elseif fluidLevel>20 && press>120 %checking condition 5

disp('Overflow risk!');

  

elseif press>125 && temp>150 %checking condition 6

disp('Pipe rupture risk!');

else

disp('Operating within safe limits'); %if none of the condition satisfies then print this

  

end

DIRECTIONS: Create a .m file in matlab by typing edit file1 at command window. After then copy paste the above code into it and run after then Input the values when asked one by one hitting enter.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote