Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

b) An engineer develops a program in MATLAB to predict flood due to heavy rainfall in Malaysia. The program should correlate amount of rainfall and

image text in transcribedimage text in transcribed

b) An engineer develops a program in MATLAB to predict flood due to heavy rainfall in Malaysia. The program should correlate amount of rainfall and water level of the river. As trial, the engineer creates a short program for three river monitoring stations in Johor as given in Table 1.1. Table 1.1 River monitoring stations in Johor City Danger Level (m) Johor Bahru Kota Tinggi Segamat River monitoring stations Sg.Skudai Sg.Johor Sg.Lenik 3.00 9.80 6.00 The program should receive input of rainfall precipitation and expected to give warning when the water level exceeds the danger level which that can cause floods, alert message when water level rise from normal level or safe message if water at normal level. In order to create the program, the engineer gathers information as below: Q = 0.1767P + 0.8248 (1.1) Equation 1.1 obtained from regression of historical data of precipitation, P (mm) and water flowrate, Q (m/s). (BH)5/3/5 Qr n(B + 2H)2/3 (1.2) Equation 1.2 used to estimate the flowrate of a river, Q. (m/s), where S is slope (m/m), H is depth (m), B is river width (m) and n is Manning roughness coefficient. The parameter for each river is given in Table 1.2 below. Table 2.1 Parameters of river in Johor B 18 River Sg Skudai Sg Johor Sg Lenik S 0.0003 0.0001 0.0002 0.05 0.14 23 20 0.095 The engineer creates a program by comparing the maximum Q, calculated at danger level of height with Q. If Q is greater than Qr, thus the water level exceeds the river danger level, while if Q is around 70% of Or, it is at alert level otherwise it is at normal level. The expected results of the program are shown in Figure 1.1. Nevertheless, the engineer encountered problems where program in Figure 1.2 has 20 errors messages. As an expert, help the engineer to analyse the errors messages shown in Figure 1.3. Rewrite all the MATLAB commands with corrections in Figure 1.4. Remain the program structure and number of lines as original MATLAB program. In your answer, please highlight fixed errors using highlighter. (40 Marks) Command Window >> PloodPrediction2 Select city: Johor Bahru/Segamat/Kota Tinggi Johor Bahru Average Precipitation (mm) - 124 Error in input. Please try again >> Flood Prediction2 Select city: Johor Bahru/Segamat/Kota Tinggi= Johor Bahru Average Precipitation (mm) =124 !!! ALERT! Water level rise above normal level at sg Skudai river in Johor Bahru city >> Flood Prediction2 Select city: Johor Bahru/Segamat/Kota Tinggi= Segamat Average Precipitation (mm) -100 ***Water level at Sg Lenik, Segamat: Normal level*** >> Flood Prediction 2 Select city: Johor Bahru/Segamat/Kota Tinggi Kota Tinggi Average Precipitation (mm)=320 !!! WARNING! Evacution needed. Sg Johor river in Kota Tinggi city exceed the danger level. Please evacuate people to the nearest evacuation center. Figure 1.1 Expected results of program executed for different cases

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_2

Step: 3

blur-text-image_3

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

Students also viewed these Databases questions

Question

Discuss the six purposes of performance management. page 340

Answered: 1 week ago

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago

Question

2 The role of economic theory in economics.

Answered: 1 week ago