Question: i need a code to calculate forward error and backward error USE FOLLOWING FORM format long e %call fzero for first initial guess [rootest1, fval1]

 i need a code to calculate forward error and backward error

i need a code to calculate forward error and backward error

USE FOLLOWING FORM

format long e

%call fzero for first initial guess

[rootest1, fval1] =fzero(@(x)exp(x-1)-1,5)

%show output

rootest1

fval1

%compute errors

forerr1 =

backerr1 =

In the script file, first compute the root of f(x) =er1-1 using fzero with initial guesses xo = 5 and x, = 5+10-10. For each initial guess, show the values of rootest and fval, and use these to compute and show the forward and backward absolute errors for each initial guess, using the exact root for the errors. The input func is the function et-1-1 enclosed by apostrophes. The outputs are the final root estimate and f(x) evaluated at this estimate. Use exp() for the exponential function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!