Question: 1. Consider that you are an engineer tasked with writing software for the Detroit Water and Sewerage Department. Your task is to write a script

 1. Consider that you are an engineer tasked with writing software

1. Consider that you are an engineer tasked with writing software for the Detroit Water and Sewerage Department. Your task is to write a script that would detect critical fluctuations in water pressure in the distribution piping from the Water Works Park on East Jefferson Avenue. Automatic pressure sensors collect data every 1 second. Your software is supposed to compare the pressure value after each measurement and alert officials if the value is outside of the normal operating range. The standard operating pressure for a distribution system is between 60 and 80 psi. The minimum working pressure is 35 psi. The maximum working pressure is 100 psi Your script should contain the following characteristics: Initialize pressure to be 70 psi while loop with a conditional that checks for pressure to be within the normal range To simulate the pressure measurement, use the built-in MATLAB function randi between the ranges of 15 and 120. Use an if statement that will break the while loop operation if no abnormal pressure occurs after 20 readings. o o if else-if code block to provide information to staff: If the pressure drops below 35 psi, then an alert should display to the command window, "Warning: Pressure is too low!" If the pressure exceeds 100 psi, an alert should display to the command window "Warning: Pressure is too high!" If pressure within normal range, "All systems normal!') Otherwise, a message should display "Warning: Abnormal Pressure! Perform systems check!" o o o o

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!