Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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]

image text in transcribed

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

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

Step: 3

blur-text-image

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago

Question

=+Are they specific or general in nature?

Answered: 1 week ago