Main Content

# toeplitz

## 语法

``T = toeplitz(c,r)``
``T = toeplitz(r)``

## 说明

``T = toeplitz(c,r)` 返回非对称托普利茨矩阵，其中 `c` 作为第一列，`r` 作为第一行。如果 `c` 和 `r` 的首个元素不同，`toeplitz` 将发出警告并使用列元素作为对角线。`

``T = toeplitz(r)` 返回对称的托普利茨矩阵，其中：如果 `r` 是实数向量，则 `r` 定义矩阵的第一行。如果 `r` 是第一个元素为实数的复数向量，则 `r` 定义第一行，`r'` 定义第一列。如果 `r` 的第一个元素是复数，则托普利茨矩阵是抽取了主对角线的埃尔米特矩阵，这意味着对于 $i\ne j$ 的情况，${\text{T}}_{i,j}=\mathrm{conj}{\text{(T}}_{j,i}\right)$。主对角线的元素会被设置为 `r(1)`。`

## 示例

```r = [1 2 3]; toeplitz(r)```
```ans = 3×3 1 2 3 2 1 2 3 2 1 ```

```c = [1 2 3 4]; r = [4 5 6]; toeplitz(c,r)```
```Warning: First element of input column does not match first element of input row. Column wins diagonal conflict. ```
```ans = 4×3 1 5 6 2 1 5 3 2 1 4 3 2 ```

```c = [1+3i 2-5i -1+3i]; r = [1+3i 3-1i -1-2i]; T = toeplitz(c,r)```
```T = 3×3 complex 1.0000 + 3.0000i 3.0000 - 1.0000i -1.0000 - 2.0000i 2.0000 - 5.0000i 1.0000 + 3.0000i 3.0000 - 1.0000i -1.0000 + 3.0000i 2.0000 - 5.0000i 1.0000 + 3.0000i ```

```v = [9 1 3 2]; toeplitz([v(1) fliplr(v(2:end))], v)```
```ans = 4×4 9 1 3 2 2 9 1 3 3 2 9 1 1 3 2 9 ```

```x = [1 8 3 2 5]; h = [3 5 2 4 1];```

`c = [x(1) fliplr(x(end-length(h)+2:end))]`
```c = 1×5 1 5 2 3 8 ```

`x` 构建行向量 `r`

`r = x;`

`xConv = toeplitz(c,r)`
```xConv = 5×5 1 8 3 2 5 5 1 8 3 2 2 5 1 8 3 3 2 5 1 8 8 3 2 5 1 ```
`h*xConv`
```ans = 1×5 52 50 73 46 64 ```

```x = [1 8 3 2 5]; h = [3 5 2];```

`r = [x zeros(1,length(h)-1)]`
```r = 1×7 1 8 3 2 5 0 0 ```

`c = [x(1) zeros(1,length(h)-1)]`
```c = 1×3 1 0 0 ```

`xConv = toeplitz(c,r)`
```xConv = 3×7 1 8 3 2 5 0 0 0 1 8 3 2 5 0 0 0 1 8 3 2 5 ```
`h*xConv`
```ans = 1×7 3 29 51 37 31 29 10 ```

`conv(x,h)`
```ans = 1×7 3 29 51 37 31 29 10 ```

## 详细信息

### 托普利茨矩阵

`$A=\left[\begin{array}{cccccc}{a}_{0}& {a}_{-1}& {a}_{-2}& \cdots & \cdots & {a}_{1-n}\\ {a}_{1}& {a}_{0}& {a}_{-1}& \ddots & \ddots & ⋮\\ {a}_{2}& {a}_{1}& {a}_{0}& \ddots & \ddots & ⋮\\ ⋮& \ddots & \ddots & \ddots & \ddots & {a}_{-2}\\ ⋮& \ddots & \ddots & \ddots & {a}_{0}& {a}_{-1}\\ {a}_{n-1}& \cdots & \cdots & {a}_{2}& {a}_{1}& {a}_{0}\end{array}\right].$`