I have attached the picture I have posted the question below in the link. Need c
ID: 3549458 • Letter: I
Question
I have attached the picture
I have posted the question below in the link. Need complete work, clearly with matlab script.
http://postimg.org/image/x649m8utp/
http://postimg.org/image/nvs5ipk3x/
Explanation / Answer
% this is a function to bisect , use ur function the place of f , a=0, b=2 and delta = atol value and call it like this % [c,yc,err] = bisect('f',a,b,delta) .PLEAESE RATE THE ANSWER , I HAVE ANSWERED UR QUESTION %COMPLETELY function [c,yc,err,P] = bisect(f,a,b,delta) %--------------------------------------------------------------------------- %BISECT The bisection method is used to locate a root. % Sample calls % [c,yc,err] = bisect('f',a,b,delta) % [c,yc,err,P] = bisect('f',a,b,delta) % Inputs % f name of the function % a left endpoint % b right endpoint % delta convergence tolerance % Return % c solution: the root % yc solution: the function value % err error estimate in c % P History vector of the iterations % % Algorithm 2.2 (Bisection Method). % Section 2.2, Bracketing Methods for Locating a Root, Page 61 %--------------------------------------------------------------------------- P = [a b]; ya = feval(f,a); yb = feval(f,b); if ya*yb > 0, break, end max1 = 1 + round((log(b-a)-log(delta))/log(2)); for k=1:max1, c = (a+b)/2; yc = feval(f,c); if yc == 0, a = c; b = c; elseif yb*yc > 0, b = c; yb = yc; else a = c; ya = yc; end P = [P;a b]; if b-aRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.