Questions tagged [toeplitz]

In linear algebra, a Toeplitz matrix or diagonal-constant matrix, named after Otto Toeplitz, is a matrix in which each descending diagonal from left to right is constant.

In linear algebra, a Toeplitz matrix or diagonal-constant matrix, named after Otto Toeplitz, is a matrix in which each descending diagonal from left to right is constant.

Wikipedia: http://en.wikipedia.org/wiki/Toeplitz_matrix

25 questions
16
votes
5 answers

Make special diagonal matrix in Numpy

I am trying to make a numpy array that looks like this: [a b c ] [ a b c ] [ a b c ] [ a b c ] So this involves updating the main diagonal and the two diagonals above it. What would be an efficient way of doing this?
Tom Bennett
  • 2,305
  • 5
  • 24
  • 32
5
votes
1 answer

How can I generate a Toeplitz matrix in the correct form for performing discrete convolution?

Discrete convolution can be performed via the Toeplitz matrix, as shown below (Wiki article): Note that this is not the exact same form as as the general Toeplitz matrix, but it has experienced various shifts and zero-paddings. Is there a way to…
Francisco Vargas
  • 653
  • 1
  • 7
  • 22
3
votes
2 answers

Generate specific Toeplitz covariance matrix

I want to generate a statistical sample from a multidimensional normal distribution. For this I need to generate one specific kind of covariance matrix: 1 0.99 0.98 0.97 ... 0.99 1 0.99 0.98 ... 0.98 0.99 1 0.99 ... 0.97 0.98 0.99 1 …
Marcello Zago
  • 629
  • 5
  • 19
3
votes
1 answer

How to generate a Toeplitz matrix in Python using a loop instead of built-in function

I'm trying to generate a simple Toeplitz matrix using for loop in Python a = np.array([[3,4,6]]) b = np.zeros((np.size(a),np.size(a))) b[0,:] = a b[:,0] = a for i in range(1,np.size(a)): for j in range(1,np.size(a)): a[i,j] =…
3
votes
0 answers

Python: solve linear Toeplitz systems using scipy.linalg.solve_toeplitz is slow

I am trying to efficiently solve the following linear system in Python 3.6: b = A x where A is an N x N Toeplitz matrix (that is, the left-to-right diagonals are constant) and x, b are N x N matrices. The Durbin-Levinson implemented in Scipy as…
3
votes
1 answer

Matlab: How to convert a matrix into a Toeplitz matrix

Considering a discrete dynamical system where x[0]=rand() denotes the initial condition of the system. I have generated an m by n matrix by the following step -- generate m vectors with m different initial conditions each with dimension N (N…
Sm1
  • 560
  • 2
  • 6
  • 24
2
votes
1 answer

How to create a symmetric matrix of complex numbers?

I want to create a symmetric matrix with complex elements in Matlab using the toeplitz command. However if I provide the toeplitz command with complex entries it returns a Hermitian matrix, that is, the signs of the imaginary parts are reversed…
sonicboom
  • 4,928
  • 10
  • 42
  • 60
2
votes
2 answers

Toeplitz matrix using numpy/scipy

In Octave or Matlab there is a neat, compact way to create large Toeplitz matrices, for example: T = toeplitz([1,-0.25,zeros(1,20)]) That saves a lot of time that would otherwise be spent to fill the matrix with dozens or hundreds of zeros by using…
1
vote
1 answer

Condition creates segmentation fault when fulfilled

Checking if matrix is Toeplitz, when it is not, the code crashes on ***. Don't know why the if statement can't stop it. for (i = 0; i < M; i++) { for (j = 0; j < N; j++) { if (j == 0 || i == 0) { for (k = 0;; k++) { …
1
vote
1 answer

Make symmetric matrix from vector

I have to convert the vector into matrix x<-c(1:5) mat<-matrix(nrow=3, ncol=3) for (i in 1:3){ for (j in 1:3){ if (i==j) { mat[i,j]<-x[3] } else if (i < j) { ##for upper diagonal mat[i,j]<-x[j] } } } The…
Iftikhar
  • 667
  • 4
  • 10
  • 17
1
vote
1 answer

How to print a circulant matrix (toeplitz), in MATLAB, where each input is a 3D matrix of dimention m x m x 3?

I know how to use toeplitz function in MATLAB to create a circulant matrix of 1 D vector. However, I am trying to create a circulant block For example, I have 3 matrices of size (2,2,3) where third dimension is R,G, B: Below I am showing the sample…
Sulphur
  • 514
  • 6
  • 24
1
vote
1 answer

Can 2D transpose convolution be represented as a Toeplitz matrix multiplication?

Can a 2D transpose convolution operation be represented as a matrix multiplication with the Toeplitz matrix, as can be done for a normal convolution? I want to generalise some ideas from a dense network to a convolutional network. For normal…
AuSch
  • 39
  • 3
0
votes
1 answer

Cannot concatenate Toeplitz matrices in Julia 1.8.5

I can do the following fine before my last update to Julia 1.8.5. Now I get an error message. I can concatenate normal (randomly generated) matrices OK. julia> using ToeplitzMatrices julia> B1 = Toeplitz([1, 2, 4], [1, 3, 5]) 3×3 Toeplitz{Int64,…
TD TL
  • 3
  • 2
0
votes
1 answer

How to make toeplitz matrix constraint in cvxpy?

Using cvxpy( convex optimisation solver in python), there are options to make a matrix variable to be symmetric or positive semidefinite, but I require that the matrix be toeplitz (all left to right diagonals have the same element is each diagonal…
Amol Shah
  • 15
  • 4
0
votes
1 answer

toeplitz Matrix for a given N

For a given N, I need to create the following matrix: I have understood that : from scipy.linalg import toeplitz y=toeplitz(range(1,N)) will create a Toeplitz matrix. But it is not the exact matrix given above. Appreciate your help
Charith
  • 415
  • 3
  • 10
1
2