I need to use Newton's method to solve f(x). Can any one tell me what's wrong of my code and how to improve it.
1 view (last 30 days)
David Hill on 9 Feb 2022
x=ones(size(a));%this will not work well for the initial guess
If you look at your plot, you will realize that there are lots of crossings. Your initial guess for x must be close to the crossing you want.