Documentation

vander

Vandermonde matrix

Syntax

Description

example

A = vander(v) returns the Vandermonde Matrix such that its columns are powers of the vector v.

Examples

collapse all

Find the Vandermonde Matrix for Vector Input

Use the colon operator to create vector v. Find the Vandermonde matrix for v.

v = 1:.5:3
A = vander(v)
v =
    1.0000    1.5000    2.0000    2.5000    3.0000

A =
    1.0000    1.0000    1.0000    1.0000    1.0000
    5.0625    3.3750    2.2500    1.5000    1.0000
   16.0000    8.0000    4.0000    2.0000    1.0000
   39.0625   15.6250    6.2500    2.5000    1.0000
   81.0000   27.0000    9.0000    3.0000    1.0000

Find the alternate form of the Vandermonde matrix using fliplr.

A = fliplr(vander(v))
A =
    1.0000    1.0000    1.0000    1.0000    1.0000
    1.0000    1.5000    2.2500    3.3750    5.0625
    1.0000    2.0000    4.0000    8.0000   16.0000
    1.0000    2.5000    6.2500   15.6250   39.0625
    1.0000    3.0000    9.0000   27.0000   81.0000

Input Arguments

collapse all

v — Inputnumeric vector

Input, specified as a numeric vector.

Data Types: single | double
Complex Number Support: Yes

More About

collapse all

Vandermonde Matrix

For input vector v=[v1v2vN], the Vandermonde matrix is

[v1N1v11v10v2N1v21v20vNN1vN1vN0]

The matrix is described by the formula A(i,j)=v(i)(Nj) such that its columns are powers of the vector v.

An alternate form of the Vandermonde matrix flips the matrix along the vertical axis, as shown. Use fliplr(vander(v)) to return this form.

[v10v11v1N1v20v21v2N1vN0vN1vNN1]

See Also

| | | | | |

Introduced before R2006a

Was this topic helpful?