1function A3x = A3coeff(n) 2%A3COEFF Evaluate coefficients for A_3 3% 4% A3x = A3COEFF(n) evaluates the coefficients of epsilon^l in Eq. (24). 5% n is a scalar. A3x is a 1 x 6 array. 6 7 persistent coeff nA3 8 if isempty(coeff) 9 nA3 = 6; 10 coeff = [ ... 11 -3, 128, ... 12 -2, -3, 64, ... 13 -1, -3, -1, 16, ... 14 3, -1, -2, 8, ... 15 1, -1, 2, ... 16 1, 1, ... 17 ]; 18 end 19 A3x = zeros(1, nA3); 20 o = 1; 21 k = 1; 22 for j = nA3 - 1 : -1 : 0 23 m = min(nA3 - j - 1, j); 24 A3x(k) = polyval(coeff(o : o + m), n) / coeff(o + m + 1); 25 k = k + 1; 26 o = o + m + 2; 27 end 28end 29