Question: 5 . 1 6 ( mod ) The 'critical depth' y for a trapezoidal channel carrying water must satisfy the equation 1 - Q 2
mod The 'critical depth' for a trapezoidal channel carrying water must satisfy the equation
where is the flow rate, is the channel width, is the acceleration due to gravity, and is the channel crosssectional area. Determine the critical depth for a flow rate of by writing a userdefined MATLAB function that implements the Bisection method as defined below with and maximum of iterations. Carefully note the definition of my func.
Submit printout of function and command window with results.
function xr fxr ea numItermyBisectionusername myfunc es maxIter
Function file: myBisectionusername.m
urpose:
: To determine root of function associated with myfunc using the
B Bisection method
Record of revisions Date Programmer Change:
: Date I Name Original program
Main Variables:
INPUTS:
myfunc
function handle for myfunc
initial bracket
specified error toler
esror tolerance
maxiter x maximum number of iterations that can be performed
OUTPUTS :
estimate of the root
fxr x value of function at
ea x approx. percentage relative error at
numIterx number of iterations required to obtain
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
