function a = vander2(c,m)
%VANDER Vandermonde matrix.
%   VANDER(C) returns the Vandermonde matrix whose second 
%   to last column is C.  The j-th column of a Vandermonde
%   matrix is given by A(:,j) = C^(n-j).

%   J.N. Little 1-28-88
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 5.4 $  $Date: 1997/11/21 23:30:22 $

n = length(c);
c = c(:)';
a = ones(m,n);
for j = 1:m
    a(j,:) = c.^(j-1);
end
