function ax = lspx(a,lambda)
% function ax = lspx(a,lambda)
%    Expand filter 'a' through interpolation of the symmetric and 
%    antisymmetric LSP polynomials with weighting 'lambda', that is,
%    ax = lambda * pa + (1-lambda) * qa, where 'pa' and 'qa' are the
%    symmetric and antisymmetric LSP polynomials, respectively.
%    Range of lambda is 0 < lambda < 1, which produce stable filters
%    (assuming original filter is stable), both limit values produce
%    filters with zeros on the unit circle, lambda values outside
%    range produce unstable filters and lambda at either infinity
%    produces the inverse filter.
%
%    This function is an appendix to the article "All-pole Modeling 
%    Technique Based on the Weighted Sum of the LSP Polynomials",
%    presented at ICASSP'02. 
%
%    See also: LSPFIT, LSP, LSPX

% Tom Bäckström / 11.10.2001

% Caluculate LSP polynomials
pa = [a(:); 0] + flipud([a(:); 0]);
qa = [a(:); 0] - flipud([a(:); 0]);

% Calculate the extended, or interpolated polynomial
ax = lambda*pa' + (1-lambda)*qa';

