Roots with Bisection and Newton Raphson methods

27 ビュー (過去 30 日間)
Utku Palakci
Utku Palakci 2018 年 12 月 30 日
編集済み: Jan 2019 年 1 月 2 日
Hi,
How can I write a single script which tries to find the roots of the following functions using both the Bisection and Newton Raphson methods? Also I want to generate a plot of the functions showing the location of the initial guess(es) and the approximated root value..
Function Interval Tolerance
f(x) = 2sin(x) + 2cos(x) [-1 1] 1x10-3
f(x) = 2-sin(x) – x2 [-1 2] 1x10-4
  4 件のコメント
Cris LaPierre
Cris LaPierre 2018 年 12 月 31 日
This is a very common numerical methods assignment. Have you tried searching the forum yet? Chances are this question has already been answered many times.
Jan
Jan 2019 年 1 月 2 日
編集済み: Jan 2019 年 1 月 2 日
This line is incomplete:
while abs(myFunction(x_mid) >
How do I find the lower and upper limits? - You have to guess them. There is no way to find then in advance.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by