Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to format program??

9 ビュー (過去 30 日間)
Russell
Russell 2012 年 9 月 19 日
閉鎖済み: Sabin 2025 年 12 月 24 日 9:51
Hi there,
Here is my problem:
A concrete channel to bring water to Crystal Lake is being designed. It will have vertical walls and be 15 feet wide. It will be 10 feet deep, have a slope of 0.0015 feet/foot, and have a roughness coefficient of 0.014. How deep will the water be when 1000 cubic feet per second is flowing through the channel?
Use Manning's equation: Q=(1.486/N)*A*R^(2/3)*S^(1/2)
where Q is the flow of water (cubic feet per second), N is the roughness coefficient (unitless), A is the cross-sectional area of the water (square feet), S is the slope (feet/foot), and R is the hydraulic radius (feet). The hydraulic radius is the cross-sectional area divided by the wetted perimeter. For squared channels like the one in this example:
Hydraulic radius = depth * width / (2.0 * depth + width)
To solve this problem, I have to design a program that allows the me to guess a depth and then calculate the corresponding water flow. I have to guess repeatedly until the computed flow is within 0.1 percent of the target water flow desired, which is 1000 ft^3/s
I have to guess many times obviously and I am supposed to use a loop function to get my answer
  3 件のコメント
Ken Atwell
Ken Atwell 2012 年 9 月 19 日
I take is this is a homework question?
John D'Errico
John D'Errico 2018 年 2 月 26 日
編集済み: John D'Errico 2018 年 2 月 26 日
Why not make an effort? Show what you would try. If not, then you are asking someone to provide an in-depth tutorial on how to do the entire problem, including apparently teaching you how to write a loop. You will learn much by trying, by reading the help for the tools involved, by looking at examples of loops in the documentation, etc. It is that investment of effort, on YOUR part, that your teacher is trying to extract.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by