linear-algebra

Implementing the Bartels–Stewart algorithm in Eigen3?

牧云@^-^@ 提交于 2021-01-03 10:02:14
问题 In the past when I've needed to solve the Sylvester equation, AX + XB = C , I've used scipy 's function, solve_sylvester [1], which apparently works by using the Bartels-Stewart algorithm to get things into upper triangular form, and then solving the equation using lapack . I now need to solve the equation using eigen . eigen provides an function, matrix_function_solve_triangular_sylvester [2], which seems by the documentation to be similar to the lapack function which scipy calls. I'm

Implementing the Bartels–Stewart algorithm in Eigen3?

被刻印的时光 ゝ 提交于 2021-01-03 10:01:31
问题 In the past when I've needed to solve the Sylvester equation, AX + XB = C , I've used scipy 's function, solve_sylvester [1], which apparently works by using the Bartels-Stewart algorithm to get things into upper triangular form, and then solving the equation using lapack . I now need to solve the equation using eigen . eigen provides an function, matrix_function_solve_triangular_sylvester [2], which seems by the documentation to be similar to the lapack function which scipy calls. I'm

Implementing the Bartels–Stewart algorithm in Eigen3?

大憨熊 提交于 2021-01-03 09:57:00
问题 In the past when I've needed to solve the Sylvester equation, AX + XB = C , I've used scipy 's function, solve_sylvester [1], which apparently works by using the Bartels-Stewart algorithm to get things into upper triangular form, and then solving the equation using lapack . I now need to solve the equation using eigen . eigen provides an function, matrix_function_solve_triangular_sylvester [2], which seems by the documentation to be similar to the lapack function which scipy calls. I'm

Calculate a 2D homogeneous perspective transformation matrix from 4 points in MATLAB

痴心易碎 提交于 2020-12-29 04:33:05
问题 I've got coordinates of 4 points in 2D that form a rectangle and their coordinates after a perspective transformation has been applied. The perspective transformation is calculated in homogeneous coordinates and defined by a 3x3 matrix M . If the matrix is not known, how can I calculate it from the given points? The calculation for one point would be: | M11 M12 M13 | | P1.x | | w*P1'.x | | M21 M22 M23 | * | P1.y | = | w*P1'.y | | M31 M32 M33 | | 1 | | w*1 | To calculate all points

elimination the linear dependent columns of a non-square matrix in python

时光怂恿深爱的人放手 提交于 2020-12-13 03:44:52
问题 I have a matrix A = np.array([[1,1,1],[1,2,3],[4,4,4]]) and I want only the linearly independent rows in my new matrix. The answer might be A_new = np.array([1,1,1],[1,2,3]]) or A_new = np.array([1,2,3],[4,4,4]) Since I have a very large matrix so I need to decompose the matrix into smaller linearly independent full rank matrix. Can someone please help? 回答1: There are many ways to do this, and which way is best will depend on your needs. And, as you noted in your statement, there isn't even a

elimination the linear dependent columns of a non-square matrix in python

别说谁变了你拦得住时间么 提交于 2020-12-13 03:41:03
问题 I have a matrix A = np.array([[1,1,1],[1,2,3],[4,4,4]]) and I want only the linearly independent rows in my new matrix. The answer might be A_new = np.array([1,1,1],[1,2,3]]) or A_new = np.array([1,2,3],[4,4,4]) Since I have a very large matrix so I need to decompose the matrix into smaller linearly independent full rank matrix. Can someone please help? 回答1: There are many ways to do this, and which way is best will depend on your needs. And, as you noted in your statement, there isn't even a