Epsilon Algorithm for Computing Padé Approximant

6 ビュー (過去 30 日間)
Jason Nicholson
Jason Nicholson 2021 年 5 月 6 日
コメント済み: Jason Nicholson 2023 年 7 月 7 日
I am looking for a MATLAB implementation of the Epsilon Algorithm (theorem 1 from here). When I look at the Wikipedia page for Padé approximant, I find this quote: "For given x, Padé approximants can be computed by Wynn's epsilon algorithm[1]...". The Wikipedia article links to the epsilon algorithm paper. I am wondering if anyone has ran across this in MATLAB somewhere?

採用された回答

Ze-Zheng Wu
Ze-Zheng Wu 2023 年 7 月 4 日
Not sure whether you still need this but also for whoever wants to use Wynn's epsilon in MATLAB, here is the code:
function res = wynn(s)
% Step 1: Check length of s and adjust if it's even
n = length(s);
if mod(n, 2) == 0
s = s(1:end-1);
n = n - 1;
end
% Step 2: Initialize the epsilon matrix A with s on the first column
A = zeros(n, n);
A(:, 1) = s;
% Step 3: Compute the remaining columns using Wynn's method
for j = 2:n
for i = 1:(n - j + 1)
if j == 2
A(i, j) = 1 / (A(i + 1, j - 1) - A(i, j - 1));
else
A(i, j) = A(i + 1, j - 2) + 1 / (A(i + 1, j - 1) - A(i, j - 1));
end
end
end
% Step 4: Return the last element in the last column as the estimate of the limit
res = A(1, n);
end

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by