solving implicit equations with the bisection method
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am looking for reusable code where I can enter implicit equations such as ln(x)=sin(x) for example or x*tan(x)=Biot #. I prefer using the bisection method of root finding. A code that utilizes a loop and is easy to comprehend wold be the best! I also would like to get my error down to atleast 5%. Anyone have any ideas? Thanks and enjoy the soon to come weekend!
0 件のコメント
回答 (1 件)
Walter Roberson
2012 年 4 月 6 日
initial_guess = 1;
f1 = @(x) ln(x) - sin(x);
f1_solution = fzero(f1, initial_guess);
f2 = @(x) x*tan(x) - Biot_number;
f2_solution = fzero(f1, initial_guess);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!