Plotting points of intersection using Newton Raphson
이전 댓글 표시
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.

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Newton-Raphson Method에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
