Question: I need you guys to edit the given newton code and add the secant and use newtons method and compare iterations vs. tolerance plot with
I need you guys to edit the given newton code and add the secant and use newtons method and compare iterations vs. tolerance plot with one obtained secant

Newtons method
clc; clear; Xsolution = NewtonRoots(@Fun, @FunDerivative, 2, 0.0001, 20) function y = Fun(x) y =8 - 4.5*(x - sin(x)); end function y = FunDerivative(x) y = 4.5*cos(x) - 4.5; end function mat = NewtonRoots(Fun,FunDerivative,Xest, Tolerance, itrMax) %Fun : Name of the function that needs to be solved %FunDerivative = first derivative of a function %Xest = initial estimate of the solutino %Tolerance = maximum allowed error in the solution %Xs = output solution % use the function NewtonRoot in a for loop for i = 1:itrMax %Xi = Xest - (Fun(Xest))^2 / (Fun(Xest + Fun(Xest)) - Fun(Xest)) % %Steffensons Xi = Xest - Fun(Xest)/FunDerivative(Xest); % xb - f(xb) * (xa - xb) / (F(xb) - F(xa)) % X i = Xest - Fun(Xest)^2 / (Fun(Xest + Fun(Xest)) - Fun(Xest)) tol = abs((Xi-Xest)/(Xest)); if tol
Q.3 The operation of Resistance Temperature Detector (RTD) is based on the fact that the electrical resistance of the detector material changes with temperature. For Nickel which is sometimes used in such detectors, the resistance, RT, at temperature T(0C) as a function of temperature is given by: RT=R0(1+AT+BT2+CT4+DT6) where R0 us the resistance of the detector at 00C and A=5.485103,B=6.65106,C=2.8051011, and D=21017 are constants. Consider a detector with R0=100 and determine the temperature when the resistance is 300 Use Newton's Method and compare iterations vs. tolerance plot with one obtained using Secant Method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
