# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# vander

Vandermonde matrix

## Syntax

``A = vander(v)``

## Description

example

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

## Examples

collapse all

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

`v = 1:.5:3`
```v = 1.0000 1.5000 2.0000 2.5000 3.0000 ```
`A = vander(v)`
```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

Input, specified as a numeric vector.

Data Types: `single` | `double`
Complex Number Support: Yes

collapse 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]$`