rot2mat: Get back a symmetric square matrix based on his rotated...

View source: R/bandsolve.R

rot2matR Documentation

Get back a symmetric square matrix based on his rotated row-wised version.

Description

Get back a symmetric square matrix based on his rotated row-wised version. The rotated form of the input is such each column correspond to a diagonal, where the first column is the main diagonal and next ones are the upper/lower-diagonal. To match dimension, last element of these columns are discarded.

Usage

rot2mat(R)

Arguments

R

Rotated matrix.

Value

Band square matrix.

Examples


D0 = 1:5;
D1 = c(0,1,0,0);
D2 = rep(2,3);

A = rot2mat(cbind(D0,c(D1,0),c(D2,0,0)))
A
mat2rot(rot2mat(cbind(D0,c(D1,0),c(D2,0,0))))


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