Clear Filters
Clear Filters

richardson extrapolation method wrong

1 view (last 30 days)
DDD
DDD on 2 Apr 2015
Why is this richardson extrapolation method wrong?
function D=f_richardson(f,n,h,x0)
D=zeros(n,n);
e=zeros(n);
for t=1:n
D(1,t)=(f(x0+(2^(t-1))*h)-f(x0-(2^(t-1)*h)))/(2*((2^(t-1)*h)));
end
o=n-1;
for l=2:n
for k=1:o
D(l,k)=((2^(2*n-1))*D(l-1,k)-D(l-1,k+1))/(2^(2*n-1)-1);
end
o=o-1;
end
end

Answers (0)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!