Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fixedpoint.m: function [ x, k ] = fixed_point( gfunc, x0, atol, nmax ) xk = rand; % Just to start the while loop. res =

image text in transcribedfixedpoint.m:

function [ x, k ] = fixed_point( gfunc, x0, atol, nmax )

xk = rand; % Just to start the while loop.

res = xk - x0;

k = 0; % Iteration index.

iflag = 0;

while abs(res)>atol

xk = feval(gfunc,x0); % x_{k+1} = g(x_{k})

res = xk - x0;

x0 = xk;

k = k + 1;

if(k == nmax)

iflag = -1;

break;

end

end

if(iflag==0)

k = k + 1;

x = xk;

else

disp(' maximum number of iterations reached!');

x = [];

k = [];

end

end

Using the m-file "fixed point.m", find the three roots of with lzk+1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

6. Does your speech have a clear and logical structure?

Answered: 1 week ago