bisection method error between approximation and actual root
2 次查看(过去 30 天)
显示 更早的评论
Does anyone know what this question is asking? "How many iterations of the bisection would be needed to ensure that the error between your approximation of the root and the actual root location to the equation is less that delta(x)< 0.03 ?"
what does it mean by "approximation" and "actual root"? In my code I have values xleft,xright,xmiddle (left and right initial guesses, and the final result, xmiddle, which is chosen when abs(f(middle))<0.1.
0 个评论
回答(1 个)
David Goodmanson
2018-2-22
编辑:David Goodmanson
2018-2-22
Hi Rachel,
What they mean is, as you proceed with the bisection method, you keep creating new xleft, xright and xmiddle values. These values get closer and closer to each other as you proceed. If you keep track of the distances, eventually xright and xleft will be closer to each other than, say, .8. In that case you don't know exactly where the actual root (the exact answer) is, but by the nature of the bisection algorithm you know it's in between two values xright and xleft that differ by less than .8. So the next xmiddle can't be further away from the exact answer than .4. That's the basic idea, which you can alter for the circumstances you have.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!