Generate generic vectors and matrices.
vector_sym(n, entry = "v")
matrix_sym(nrow, ncol, entry = "v")
matrix_sym_diag(nrow, entry = "v")
matrix_sym_symmetric(nrow, entry = "v")
Length of vector
The symbolic name of each entry.
Number of rows and columns
if (has_sympy()) {
vector_sym(4, "b")
matrix_sym(3, 2, "a")
matrix_sym_diag(4, "s")
matrix_sym_symmetric(4, "s")
}
#> c: ⎡s₁₁ s₂₁ s₃₁ s₄₁⎤
#> ⎢ ⎥
#> ⎢s₂₁ s₂₂ s₃₂ s₄₂⎥
#> ⎢ ⎥
#> ⎢s₃₁ s₃₂ s₃₃ s₄₃⎥
#> ⎢ ⎥
#> ⎣s₄₁ s₄₂ s₄₃ s₄₄⎦