Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. What is func in this function? Provide description and how func would be ente

ID: 3727070 • Letter: A

Question

a. What is func in this function? Provide description and how func would be entered.

b. What is es? Provide definition. How can you calculate an es if you want n number of
significant digits in your final answer?
c. Why is iter=iter+1 being used?
d. What is ea?
e. When does the while loop stop?

function [root,fx,ea,iter]-bisect (func,xl,xu,es,maxit,varargin) % bisect: root location zeroes [root, fx, ea, iter] =bisect (func , xl , xu, es, maxit, p1,p2, . . . ) : uses bisection method to find the root of func % input: func = name of function xl, xu lower and upper guesses % es desired relative error (default = 0.0001%) maxit maximum allowable iterations (default = 50) % pl,p2, . . .additional parameters used by func output: rot real root fxfunction value at root ea = approximate relative error (%) % iter= number of iterations if nargin0,error ('no sign change', end if nargin

Explanation / Answer

func is the name of the function used in the above given code. es is the desired relative error. iter= iter+1 is used to increment the value of previous iter value with 1. ea is approximate relative error in percentage. the loop will end after encountering the condition and when the control goes to the end statement.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote