TeX Matrix Polynomials
as_tex_matrixpoly.Rd
TeX Matrix Polynomials
Arguments
- coefs
3-dimensional array with the coefficients of the matrix polynomial.
- x
(character string) polynomial variable or process variable.
- as_matrix_of_polynomials
boolean.
Examples
coefs = array(round(rnorm(2*3*1), 1), dim = c(2,3,2))
as_tex_matrixpoly(coefs)
#> [1] "\\begin{pmatrix}\n -0.1 - 0.1z & -1.3 - 1.3z & 2.2 + 2.2z \\\\\n 0 & -1.3 - 1.3z & 0.7 + 0.7z \\\\\n\\end{pmatrix}"
as_tex_matrixpoly(coefs, x = 'x', as_matrix_of_polynomials = FALSE)
#> [1] " \\begin{pmatrix}\n -0.1 & -1.3 & 2.2 \\\\\n 0 & -1.3 & 0.7 \\\\\n\\end{pmatrix} +\n \\begin{pmatrix}\n -0.1 & -1.3 & 2.2 \\\\\n 0 & -1.3 & 0.7 \\\\\n\\end{pmatrix} x"