Main Content

toeplitz

Create Toeplitz matrix

Description

t = toeplitz(a,b) returns a nonsymmetric Toeplitz matrix with a as its first column and b as its first row. b is cast to the numerictype of a. If one of the arguments of toeplitz is a built-in data type, it is cast to the data type of the fi object. If the first elements of a and b differ, toeplitz issues a warning and uses the column element for the diagonal.

example

t = toeplitz(b) returns the symmetric or Hermitian Toeplitz matrix formed from vector b, where b is the first row of the matrix.

example

Examples

collapse all

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)

Create a nonsymmetric Toeplitz matrix with a specified column and row vector.

toeplitz(a,b) casts b into the data type of a. In this example, overflow occurs:

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) casts a into the data type of b. In this example, overflow does not occur:

toeplitz(b,a)
ans = 

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

If one of the arguments of toeplitz is a built-in data type, it is cast to the data type of the fi object.

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)

Input Arguments

collapse all

Column of Toeplitz matrix, specified as a scalar or vector. If the first elements of a and b differ, toeplitz uses the column element for the diagonal.

Data Types: fi
Complex Number Support: Yes

Row of Toeplitz matrix, specified as a scalar or vector. If the first elements of a and b differ, toeplitz uses the column element for the diagonal.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
Complex Number Support: Yes

Output Arguments

collapse all

Toeplitz matrix, returned as a fi object.

The output fi object, t, has the same numerictype properties as the leftmost fi object input. If the leftmost fi object input has a local fimath, the output fi object is assigned the same local fimath. Otherwise, the output fi object, t, has no local fimath.

Version History

Introduced before R2006a

See Also

Blocks

Functions