Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thats all about question Question 2 50 points Save Answer 2. (50 points) Prepare a Matlab function that: Takes a function f and two values

image text in transcribed

Thats all about question

Question 2 50 points Save Answer 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 + b, 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- plished. Upload your solution as Question2.m Wrong file formats get -20 pts! NO SCREEN CAPS!!!!! Question 2 50 points Save Answer 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 + b, 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- plished. Upload your solution as Question2.m Wrong file formats get -20 pts! NO SCREEN CAPS

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions