Accelerating the pace of engineering and science

# vander

Vandermonde matrix

## Description

example

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

## Examples

expand 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

expand all

### v — Inputnumeric vector

Input, specified as a numeric vector.

Data Types: single | double
Complex Number Support: Yes

expand all

### Vandermonde Matrix

For input vector $v=\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left[\begin{array}{cccc}{v}_{1}& {v}_{2}& \dots & {v}_{N}\end{array}\right]$, the Vandermonde matrix is

$\left[\begin{array}{cccc}{v}_{1}^{N-1}& \cdots & {v}_{1}^{1}& {v}_{1}^{0}\\ {v}_{2}^{N-1}& \cdots & {v}_{2}^{1}& {v}_{2}^{0}\\ & ⋰& ⋮& ⋮\\ {v}_{N}^{N-1}& & {v}_{N}^{1}& {v}_{N}^{0}\end{array}\right]$

The matrix is described by the formula $A\left(i,j\right)=v{\left(i\right)}^{\left(N-j\right)}$ 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.

$\left[\begin{array}{cccc}{v}_{1}^{0}& {v}_{1}^{1}& \cdots & {v}_{1}^{N-1}\\ {v}_{2}^{0}& {v}_{2}^{1}& \cdots & {v}_{2}^{N-1}\\ ⋮& ⋮& \ddots & \\ {v}_{N}^{0}& {v}_{N}^{1}& & {v}_{N}^{N-1}\end{array}\right]$