Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to format program??
8 次查看(过去 30 天)
显示 更早的评论
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 个评论
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!