Algosim documentation: VandermondeMatrix

VandermondeMatrix

Creates a Vandermonde matrix.

Syntax

Description

If u is a vector and n a positive number, then VandermondeMatrix(u, n) returns the Vandermonde matrix with n columns and the kth column containing the (k − 1)th powers of the components of u. If omitted, n defaults to the dimension of u.

Examples

VandermondeMatrix(❨1, 2, 3, 4❩)
⎛ 1   1   1   1⎞
⎜ 1   2   4   8⎟
⎜ 1   3   9  27⎟
⎝ 1   4  16  64⎠
VandermondeMatrix(❨1, 2, 3, 4❩, 10)
⎛     1       1       1       1       1       1       1       1       1       1⎞
⎜     1       2       4       8      16      32      64     128     256     512⎟
⎜     1       3       9      27      81     243     729    2187    6561   19683⎟
⎝     1       4      16      64     256    1024    4096   16384   65536  262144⎠

See also