what that is mean n, into Shanks acceleration

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!!!

 Respuesta aceptada

Star Strider
Star Strider el 23 de Mzo. de 2016

1 voto

The value of ‘n’ is the limit of the length of the vector in the ‘x’ calculation.

1 comentario

Star Strider
Star Strider el 23 de Mzo. de 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 π.)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 23 de Mzo. de 2016

Editada:

el 23 de Mzo. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by