function ad = deflate(a,r)
%
% ad = deflate(a,r)
%
% This deflates the polynomial with coefficients (with descending degree) in a
% by using the known root r and returns the deflated polynomial with coefficents
% in ad (with descending degree).
%

% Troy Henderson
% Assistant Professor
% University of Mobile
% Updated 7 February, 2008

ad(1) = a(1);
for j=2:length(a)-1
	ad(j) = a(j) + ad(j-1)*r;
end
endfunction
