Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Someone can explain me ? 2. (50 points) Prepare a Matlab function that: Takes a function f and two values a, b and tol as
Someone can explain me ?
2. (50 points) Prepare a Matlab function that: Takes a function f and two values a, b and tol as inputs. Makes sure that a 7b, else errors out. Generates an array x between a and b with a step length of 0.1 Generates an array y, the evaluation of f at r. Searches for all negative entries in y, and records the relevant entries of x into a new array xNegEval. Searches for all positive entries in y, and records the relevant entries of x into a new array xPosEval. If either xNeqEval or xPosEval is empty (i.e of length 0!) then items 3-7 in this list is repeated for step length 0.01, 0.001, 0.0001, ... so on and so forth. If both xNeqEval and xPosEval are non-empty, the false-position method is applied until we reach the desired tolerance. The estimate is outputted as "rootEst Comment everything!, Also specify in your comments what you think this function has accom- plishedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started