主要内容

toeplitz

创建托普利茨矩阵

说明

t = toeplitz(a,b) 返回非对称托普利茨矩阵,其中 a 作为其第一列,b 作为其第一行。b 强制转换为 anumerictype。如果 toeplitz 的参量之一是内置数据类型,则它将强制转换为 fi 对象的数据类型。如果 ab 的首个元素不同,toeplitz 将发出警告并使用列元素作为对角线。

示例

t = toeplitz(b) 返回由向量 b 构成的对称或埃尔米特托普利茨矩阵,其中 b 是矩阵的第一行。

示例

示例

全部折叠

r = fi([1 2 3]);
toeplitz(r)
     1     2     3



          DataTypeMode: Fixed-point: binary point scaling
            Signedness: Signed
            WordLength: 16
        FractionLength: 13


        RoundingMethod: Nearest
        OverflowAction: Saturate
           ProductMode: FullPrecision
               SumMode: FullPrecision


                   Tag: 

ans = 

     1     2     3
     2     1     2
     3     2     1
      numerictype(1,16,13)

创建一个具有指定的列和行向量的非对称托普利茨矩阵。

toeplitz(a,b)b 强制转换为 a 的数据类型。在此示例中,发生溢出:

fipref('NumericTypeDisplay','short');
format short g
a = fi([1 2 3],true,8,5)
b = fi([1 4 8],true,16,10)
toeplitz(a,b)
a = 

     1     2     3
      numerictype(1,8,5)

b = 

     1     4     8
      numerictype(1,16,10)

ans = 

            1       3.9688       3.9688
            2            1       3.9688
            3            2            1
      numerictype(1,8,5)

toeplitz(b,a)a 强制转换为 b 的数据类型。在此示例中,不发生溢出:

toeplitz(b,a)
ans = 

     1     2     3
     4     1     2
     8     4     1
      numerictype(1,16,10)

如果 toeplitz 的参量之一是内置数据类型,则它将强制转换为 fi 对象的数据类型。

x = double([1 exp(1) pi]);
toeplitz(a,x)
ans = 

            1       2.7188       3.1563
            2            1       2.7188
            3            2            1
      numerictype(1,8,5)

输入参数

全部折叠

托普利茨矩阵的列,指定为标量或向量。如果 ab 的首个元素不同,toeplitz 将使用列元素作为对角线。

数据类型: fi
复数支持:

托普利茨矩阵的行,指定为标量或向量。如果 ab 的首个元素不同,toeplitz 将使用列元素作为对角线。

数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
复数支持:

输出参量

全部折叠

托普利茨矩阵,以 fi 对象形式返回。

输出 fi 对象 t 具有与最左侧 fi 对象输入相同的 numerictype 属性。如果最左侧 fi 对象输入具有局部 fimath,则输出 fi 对象被赋予相同的局部 fimath。否则,输出 fi 对象 t 没有局部 fimath

版本历史记录

在 R2006a 之前推出

另请参阅

模块

函数