Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function in Matlab that calculates the normal depth for a trapezoidal section. Use the following call statement for your function: [yo] Normal
Write a function in Matlab that calculates the normal depth for a trapezoidal section. Use the following call statement for your function: [yo] Normal Depth Trap (Q, b, m, So, n, Kn) where Q-discharge, b = bottom width, m = side slope (m:1, H:V), S. channel bed slope, n= Manning's coefficient, and K. = 1.0 for SI units (m and m/s) and 1.49 for English units (ft and ft/sec). The given inputs are sufficient; however, you may add others, if desired (e.g. to handle different units, see Homework 2 solution). Additionally, you may add outputs such as geometric properties of the channel at normal depth (area, wetted perimeters, top width, etc.). Use the Matlab function "fzero" to solve the non-linear equation (see demo script on Blackboard, Matlab documentation, and Homework 3). (a) Provide a printout of your code and (b) verify your code by solving the in-class example (a trapezoidal section with Q-100 cfs, b-20 ft, m 2, S. 0.001, and n=0.03). The solution to this problem is yo 1.938 ft. Include a print out of your script and/or the command window showing your solution for (b).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started