home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SPECMAT.DI$ / VANDER.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  369 b   |  16 lines

  1. function a = vander(c)
  2. %VANDER    Vandermonde matrix.
  3. %    VANDER(C) returns the Vandermonde matrix whose second to
  4. %    last column is C.  The j-th column of a Vandermonde
  5. %    matrix is given by A(:,j) = C^(n-j).
  6.  
  7. %    J.N. Little 1-28-88
  8. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  9.  
  10. n = max(size(c));
  11. c = c(:);
  12. a = ones(n);
  13. for j = 1:n
  14.     a(:,j) = c.^(n-j);
  15. end
  16.