mat2rot: Rotate a band matrix to get the rotated row-wised matrix...

View source: R/bandsolve.R

mat2rotR Documentation

Rotate a band matrix to get the rotated row-wised matrix associated.

Description

Rotate a symmetric band matrix to get the rotated matrix associated. Each column of the rotated matrix correspond to a diagonal. The first column is the main diagonal, the second one is the upper-diagonal and so on. Artificial 0 are placed at the end of each column if necessary.

Usage

mat2rot(M)

Arguments

M

Band square matrix or a list of diagonal.

Value

Rotated matrix.

Examples


A = diag(4)
A[2,3] = 2
A[3,2] = 2

## Original Matrix
A
## Rotated version
R = mat2rot(A)
R

rot2mat(mat2rot(A))

aspline documentation built on June 9, 2022, 9:05 a.m.