I am using bisection method to solve an equation, but the solution always shows the first value input and I don't know where my mistake is
조회 수: 2 (최근 30일)
이전 댓글 표시
I am using the biscetion method to solve an equation but the solution is always the first picked value (xLeft).
bisection_method()
댓글 수: 0
답변 (1개)
Walter Roberson
2021년 12월 23일
D=0.1016; Q=0.00368; p=900;u=0.008; e=0;
A = (1/4)*pi*D^2;
R = (p*D*Q)/(u*A);
f = @(ft) 1/(-2*log((e/D)/3.7)+(2.51/(R*(ft^0.5))))^2;
syms ft
f(ft)
simplify(ans)
Notice the infinity, which is from the log((e/D)/3.7) when e is 0.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!