Math Lab code?

조회 수: 3 (최근 30일)
Marina Yanes
Marina Yanes 2022년 3월 28일
편집: Sam Chak 2022년 3월 28일
Given the polynomial
write a script that use Newton-Raphson method to determine the real root for the equation using an initial guess of x0 = 3.5 subject to the stopping condition of f(x0) <= 10-6.
Recall for Newton-Raphson method, the iterative algorithm is given by
x1 = x0 – f(x0)/fxp(x0)
where fxp stand for the derivative of f(x)
  댓글 수: 2
KSSV
KSSV 2022년 3월 28일
What have you attempted for your home work?
Sam Chak
Sam Chak 2022년 3월 28일
편집: Sam Chak 2022년 3월 28일
Is the root-finding problem related to your soccer field project?
It seemed like none of the THREE (3) suggested solutions in the Answers work for you because there is no feedback.
Anyhow, I think the polynomial function can be written like this:
function fx = func(x)
fx = x^3 - 5.75*x^2 + 8*x - 16;
Can you provide the derivative of ?
I think the stopping criteria can be written like this:
if abs(func(x)) <= 1e-6
break;
end

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Newton-Raphson Method에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by