I am creating a raw code for the Newton raphson method using a while loop like so
f = sin(x)-cos(x);
xnew = x - y/dy;
i = i+1;
xold = x;
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.