helpin me with a fixed point method function

조회 수: 2 (최근 30일)
Faraz Vossoughian
Faraz Vossoughian 2016년 10월 11일
Hi, Im having difficulty coming up with a fixed point function; this is what i came up with: please tell me what modifications i shpuld make to this:
function [root,y,ea,iter]=fixedpoint(func,x0,es,maxiter)
iter=0;
ea=100;
g(x0)+x= func(x0);
while (1)
x0= root;
root=g(root);
iter = iter + 1;
if xr ~= 0, ea = abs((root - x0)/root) * 100;
end
if ea <= es | iter >= maxiter, break, end
end
y=func(root);
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by