Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

%Newton Raphson Method %Finds the roots of the function. %Inputs: f, function % f1, first derivative of f % xold, initial guess % tol, tolerance

image text in transcribed

%Newton Raphson Method %Finds the roots of the function. %Inputs: f, function % f1, first derivative of f % xold, initial guess % tol, tolerance of accuracy of solution %Outputs: r = root % i = number of iterations function [r, i] = NewtonRaphsonMethod(f,f1,xold,tol)

format long format compact

%Initialize res (value of f at approximation) res = 100;

%Set iteration counter i=1;

%Newton Raphson Method %Runs while res is greater than the tolerance OR until 1000 iterations have %been completed while res > tol & i

r = xnew;

Generate a MATLAB script to obtain all roots of the following polynomial lying in the range -5.5 to 4.0 by the Newton-Raphson Method using NewtonRahphson.m. f(x) = 1.1x + 1.15x2 - 17.1x+15.2 Using MATLAB, draw a graph of the polynomial for the given range of x. Label it and give it a title. Verify your answers by using the fzero function. Also obtain all the roots of the polynomial with the roots function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions