Plotting points of intersection using Newton Raphson
Show older comments
I am creating a raw code for the Newton raphson method using a while loop like so
x=1;
xold=0;
i=0;
format short
while abs(x-xold)>.01
f = sin(x)-cos(x);
f_1 =cos(x)+sin(x);
xnew = x - y/dy;
i = i+1;
xold = x;
end
plot([xnew], [0.719], '*r' )
plot([new], [-0.719], '*r' )
This is after plotting the 2 graphs before cos(x) and sin(x). Now i would like to plot the points of intersection that were found through the newton raphson's method.
The last 2 lines of the code are incorrect as when i tried some different values i was getting 2 points.

Accepted Answer
More Answers (0)
Categories
Find more on Newton-Raphson Method 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!