what that is mean n, into Shanks acceleration
1 view (last 30 days)
Show older comments
what that is mean n, into Shanks acceleration
clc
clear all
S=@(x) (x(1:end-2).*x(3:end)-x(2:end-1).^2)...
./(x(3:end)-2*x(2:end-1)+x(1:end-2));
tic
*n=25*;
x=cumsum(-1./(1:2:2*n).*(-1).^(1:n));
x1=S(x);
x2=S(x1);
x3=S(x2)
4*[x(end);x1(end);x2(end);x3(end)]
toc
Please I need you're help please!!!
0 Comments
Accepted Answer
Star Strider
on 23 Mar 2016
The value of ‘n’ is the limit of the length of the vector in the ‘x’ calculation.
1 Comment
Star Strider
on 23 Mar 2016
The value is given there as 25. My impression from the Wikipedia article on Shanks transformation is that the choice of ‘n’ is arbitrary, and depends on the sequence.
In the example you cited, ‘x’ is the sequence. (It is likely the same sequence as in the Wikipedia article, and calculates the value of π.)
More Answers (0)
See Also
Categories
Find more on Dates and Time 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!