sylvester: Solve Sylvester equation AX + XB = C.

Description Usage Arguments Value Examples

View source: R/sylvester.R

Description

sylvester finds the matrix X that obey this equation, given matrices A, B, and C.

Usage

1
sylvester(A, B, C, tol = 1e-04)

Arguments

A

Input matrix

B

Input matrix

C

Input matrix

tol

The tolerance of the algorithm

Value

X Output matrix

Examples

1
2
3
4
5
6
7
set.seed(123)
A <- matrix(rnorm(9),3,3)
B <- matrix(rnorm(9),3,3)
Xtrue <- matrix(rnorm(9),3,3)
C <- A %*% Xtrue + Xtrue %*% B
X <- sylvester(A,B,C)
X - Xtrue

sakuramomo1005/bi-ADMM documentation built on Dec. 22, 2021, 9:20 p.m.