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