Question: a=8 In this exercise, you will code Newton's method in MATLAB. Goal: Write a MATLAB script to approximate the cube root Va of a given

a=8

a=8 In this exercise, you will code Newton's method in MATLAB. Goal:

Write a MATLAB script to approximate the cube root Va of a

given number a with accuracy roughly within 10- Use initial guess zo

In this exercise, you will code Newton's method in MATLAB. Goal: Write a MATLAB script to approximate the cube root Va of a given number a with accuracy roughly within 10- Use initial guess zo and maximum 100 iterations. Please rewrite the code in page 2 and play with it. Here, I have implemented the Fixed-Point iteration method for cos(x)-sin(x)-0 oint iteration method for cOS - sin( loloblihllololelblolelol Fixed parameters viiihhl iter- 0; iter_max - 100; rel_error-10; tolerance10-8 xold-0; % initial guess f -0(x) (x + cos (x)-sin(x)); x_appro -; % solves cos (x) -sin(x) rel error col-; ((rel-error new- f(xold); % think about this line rel_error-abs (xnew-xold); rel error_col- [rel_error_col;rel_error]; x_appro -[x_appro; xnew] xold - xnew; iter-iter 1; while > tolerance) 11 (iter > iter-max)) % ???? tot_iter-(1:iter)'; x apprO; fprintf('Simulation Summary '); fprintf('iteration x-values Relative error ') fprintf("X3 . Of \t %6.8f \t %6.8f ', [tot-iter , ;x-appro'; rel-error-col'])

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!