Question: I need help with this matlab about the newton method. My TA told us to use the 'for' loop for the first question and the

I need help with this matlab about the newton method. My TA told us to use the 'for' loop for the first question and the 'while' loop for the second and third questions. Here are some coding examples from lab:

For:

I need help with this matlab about the newton method. My TA

While:

told us to use the 'for' loop for the first question and

Using the examples from class I am still unsure how to find the answers to the follwing three questions.

the 'while' loop for the second and third questions. Here are some

Any help would be greatly appreciated. Also, screenshots from MATLAB would be helpful.

clear from [0,1] % find the x-intercept berusea f(x) and f (x)-(cos (3*pi*x/2),"2"X x-axes hold orn grid on % Newton Method formula newton (x)-x-f (x) / (diff(f (xLx)) % create an array which store the index % create an array to store the answer answer(1)-0.2 for n=2:19 step 2&3 answer (n)-newton (answer (n-1) ) count (n)-n end count' Wpalan swer)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!