Question: Existing code for problem: function root = recur_bisec(f,a,b,eps) % finds the mid value m = (a+b)/2; % if tolerence is reached then return the m
Existing code for problem:
function root = recur_bisec(f,a,b,eps)
% finds the mid value m = (a+b)/2;
% if tolerence is reached then return the m as root if(abs(f(m)) % if the f(m)<0 replace b by m and call recursively elseif(f(m)<0) root = recur_bisec(f,a,m,eps); % if the f(m)>0 replace a by m and call recursively elseif(f(m)>0) root = recur_bisec(f,m,b,eps); end end THIS IS THE PROBLEM TO SOLVE FOR: Write a wrapper function to extend the above Matlab function to find multiple roots on the interval by first identifying relevant sub-intervals using sampling at a given resolution to estimate initial zero crossings.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
