Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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