I'm not sure how to set the stop criterion in the bisecting method
Show older comments

This is what I have so far..
f=@(x) (x^3)-(3*x^2)-(x)+9;
a=-2;
b=-1;
for i=1:1000
c=(a+b)/2;
if f(c)>0
b=c;
else a=c;
end
end
fprintf('Root of given equation is %f',c)
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!