Manning\' s equation can be used to compute the velocity of water in a rectangul
ID: 2325185 • Letter: M
Question
Manning' s equation can be used to compute the velocity of water in a rectangular open channel: where V = velocity (m/s), S = channel slope, n = roughness coefficient, B = width (m), and H = depth (m). The following data are available for five channels: Write a M-file that computes the velocity for each of these channels. Enter these values into a matrix where each row represents a parameter and each column represents a channel. Have the M-file display the input data along with the computed velocity in tabular form where velocity is the fifth row. Include headings on the output table to give proper labeling. Which channel gives the fastest flow velocity?Explanation / Answer
n = input('Enter roughness coefficient:');
S = input ('Enter channel slope:');
B = input('Enter width in m:');
H = input('Enter depth in m:');
V = (sqrt(S)./n).*(B.*H./(B+2*H)).^(2/3);
f = figure(1);
dat = [n;S;B;H;V];
cnames = {'Channel 1','Channel 2','Channel 3','Channel 4','Channel 5'};
rnames = {'n','S','B','H','V'};
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 500 150]);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.